| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 39657 | 奚晨瑞 | 验证子串 | C++ | Accepted | 0 MS | 256 KB | 373 | 2024-02-03 18:12:59 |
#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; }