'commit'
This commit is contained in:
16
TangDou/XiTi/1096.cpp
Normal file
16
TangDou/XiTi/1096.cpp
Normal file
@@ -0,0 +1,16 @@
|
||||
#include <bits/stdc++.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
int main() {
|
||||
string s1, s2;
|
||||
getline(cin, s1);
|
||||
getline(cin, s2);
|
||||
//查找子串位置
|
||||
if (s2.find(s1) != s2.npos) {
|
||||
cout << s1 << " is substring of " << s2 << endl;
|
||||
} else {
|
||||
cout << "No substring" << endl;
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
Reference in New Issue
Block a user