2861: 验证子串 输入用cin可以,用getline不行,不知道为什么 摘要:解题思路:注意事项:参考代码:#include <iostream> // #include <sstream> // #include <cstdio> // #include <algori…… 题解列表 2023年02月22日 0 点赞 0 评论 225 浏览 评分:5.2
2861: 验证子串(python) 摘要:解题思路:注意事项:参考代码:a = input().strip() # 注意把前导空格去掉 b = input().strip() if a in b: print("%s is s…… 题解列表 2023年02月24日 0 点赞 0 评论 243 浏览 评分:9.9
java验证子串(indexOf方法) 摘要:解题思路:利用indexOf方法判断一个字符串是否是另一个的子串注意事项:参考代码:package ten;import java.util.Scanner;public class 验证子串 { …… 题解列表 2023年04月24日 0 点赞 0 评论 184 浏览 评分:9.9
2861-验证子串 摘要:解题思路:实际上本题用到了数据结构的思想,采用最传统的暴力法,不断的比较注意事项:参考代码:int main(){ char s1[201]; char s2[201]; int len1…… 题解列表 2023年06月20日 0 点赞 1 评论 218 浏览 评分:0.0
验证子串(二种方法) 摘要:解题思路:注意事项:参考代码:第一种强行解题,硬解:#include<stdio.h> #include<string.h> int main() { char a[200]; char…… 题解列表 2023年10月21日 0 点赞 0 评论 254 浏览 评分:0.0
长短比较确定正反。 摘要:解题思路:设定三个字符串,strm,strn,stra。其中stra是对长的字符串(strm或者strn)进行部分截取,再与短的字符串进行strcmp函数的比较。注意事项:参考代码:#include<…… 题解列表 2023年11月03日 0 点赞 0 评论 304 浏览 评分:8.0
c代码记录之验证字串 摘要:1.空串是所有字符串的子串,但这题好像不验证这个 2.gets不通过,scanf能通过 #include #include int main() { …… 题解列表 2023年11月30日 0 点赞 1 评论 182 浏览 评分:2.0
题解 2861: 验证子串(用isSubstring()函数解决) 摘要:```c #include #include int isSubstring(char* a, char* b, int len_a, int len_b)//默认len_a>len_b { …… 题解列表 2023年12月17日 0 点赞 0 评论 109 浏览 评分:0.0
str1.contains(str2) 摘要:解题思路:注意事项:参考代码:import java.util.Scanner;public class Main { public static void main(String[] args…… 题解列表 2023年12月23日 0 点赞 0 评论 100 浏览 评分:0.0
2861: 验证子串 摘要:解题思路:无注意事项:无参考代码:#include <bits/stdc++.h> using namespace std; int main() { string str ; …… 题解列表 2023年12月23日 0 点赞 0 评论 123 浏览 评分:9.9