Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
---|---|---|---|---|---|---|---|---|
39656 | 奚晨瑞 | 验证子串 | C++ | Wrong Answer | 1 MS | 256 KB | 369 | 2024-02-03 18:12:37 |
#include<iostream> #include<cstring> using namespace std; int main() { string s1; string s2; cin>>s1>>s2; if(s2.find(s1) != string::npos) { cout << s1 << "is substring of" << s2 << endl; } else if(s1.find(s2) != string::npos) { cout << s2 << "is substring of" << s1 << endl; } else { cout << "No substring" << endl; } return 0; }