| Run ID | Author | Problem | Lang | Verdict | Time | Memory | Code Length | Submit Time |
|---|---|---|---|---|---|---|---|---|
| 40492 | lnx | 验证子串 | C++ | Wrong Answer | 1 MS | 248 KB | 395 | 2024-02-10 22:31:16 |
#include<iostream> #include<cstdio> #include<cstdlib> #include<cmath> #include<cstring> #include<string> using namespace std; int main() { char s1[200],s2[200]; cin>>s1>>s2; char* ret1=strstr(s1,s2); char* ret2=strstr(s2,s1); if(ret1!="NULL") cout<<s1<<" is substring of "<<s2; else if(ret2!="NULL") cout<<s2<<" is substring of "<<s1; else cout<<"No substring"; }