- 编程
序列判定比赛题目数据太简单了
- 2025-5-10 10:34:43 @
题目中说子序列是指在字符串中保持原本顺序,但不一定连续的字符序列,但是测试数据的子序列在父序列中都是连着的,我的find代码都能AC:#include<bits/stdc++.h> #define int long long using namespace std;
signed main(){ ios::sync_with_stdio(0); cin.tie(0); cout.tie(0);
string p,t;
cin>>p>>t;
auto a=t.find(p);
if(a!=string::npos){
cout<<"Yes";
}else{
cout<<"No";
}
return 0;
}
0 条评论
目前还没有评论...