Run ID 作者 问题 语言 测评结果 时间 内存 代码长度 提交时间
40492 lnx 验证子串 C++ 解答错误 1 MS 248 KB 395 2024-02-10 22:31:16

Tests(0/3):


#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"; }


测评信息: