题解 2861: 验证子串

来看看其他人写的题解吧!要先自己动手做才会有提高哦! 
返回题目 | 我来写题解

筛选

随便解释一下吧

摘要:解题思路:注意事项:参考代码:#include<stdio.h>int main ( ){    char s1[201]={0} ,s2[201]={0} ;    int i=0 ,a=0 ,c=……

2861: 验证子串

摘要:解题思路:注意事项:参考代码:#include <stdio.h>#include <stdlib.h>#include <string.h>#define maxn 205char cmp(char……

验证字串C解

摘要:解题思路:注意事项:用gets只能过一部分,scanf能全过,也不知道为啥参考代码:#include<stdio.h>#include<string.h>int main(){    char s1[……

c代码记录之验证字串

摘要:1.空串是所有字符串的子串,但这题好像不验证这个 2.gets不通过,scanf能通过 #include #include int main() { ……

长短比较确定正反。

摘要:解题思路:设定三个字符串,strm,strn,stra。其中stra是对长的字符串(strm或者strn)进行部分截取,再与短的字符串进行strcmp函数的比较。注意事项:参考代码:#include<……

验证子串(二种方法)

摘要:解题思路:注意事项:参考代码:第一种强行解题,硬解:#include<stdio.h> #include<string.h> int main() { char a[200]; char……

2861-验证子串

摘要:解题思路:实际上本题用到了数据结构的思想,采用最传统的暴力法,不断的比较注意事项:参考代码:int main(){ char s1[201]; char s2[201]; int len1……