竞赛
考级
openjudge
变鸽的一只呱
法兰西玫瑰
啊?
#include<bits/stdc++.h> using namespace std; int main() { string a,b; cin >> a; cin >> b; int y = a.find(b); int z = b.find(a); if(z==-1) { if(y==-1) { cout << b << " is substring of " << a; } else printf("No substring"); } else if(y==-1) { if(z!=-1) { cout << a << " is substring of " << b; } else { printf("No substring"); } } else printf("No substring"); return 0; }
159****5594
空降坐标:CP003090 请看代码1 请看代码2 方法2相当于自己写一个find函数了 有点废 但是也能AC
LiWei
majmDZB
#include <bits/stdc++.h> #include <string> using namespace std; string s1,s2; int t=0; int main() { cin>>s1>>s2; if(s1.find(s2)!=-1) { cout<<s2<<" is substring of "<<s1; } else if(s2.find(s1)!=-1) { cout<<s1<<" is substring of "<<s2; } else { cout<<"No substring"; } return 0; }
科比半糖肘击黑曼巴左巴扬丁真老师
#include <iostream> using namespace std; string s1,s2; int t=0; int main() { cin>>s1>>s2; if(s1.find(s2)!=-1) { cout<<s2<<" is substring of "<<s1; } else if(s2.find(s1)!=-1) cout<<s1<<" is substring of "<<s2; } else { cout<<"No substring";//////嗨 我是颠佬 你也是颠佬 } return 0; }
kunkunxiaozi
#include<iostream> #include<cstring> using namespace std; int main(){ }
&;̨̡͇̲͙̞̺̪̯
前面的题解以后再来探索吧 (欸嘿)
嫌疑を避ける ~~
潜龙暗虎
很烫的凉水
YuQing1919
JMZ詹总
蒟蒻一只
#include <bits/stdc++.h> using namespace std; int main() { string s1,s2; cin>>s1>>s2; if(s1.find(s2)!=-1){ cout<<s2<<" is substring of " <<s1; }else if(s2.find(s1)!=-1){ cout<<s1<<" is substring of " <<s2; } else{ cout<<"No substring"; } }
139****8903
151****9879
6.
_1943