题解:AT_joi2027_yo1b_d ペア (Pairs)
pigeon4836 · · 题解
传送门
题目大意
问字符串
分析
发现两个字符串都很短,但是
Code
#include<iostream>
#include<string>
using namespace std;
int main(){
int n,m,k;
string s,t,x;
cin>>n>>s>>m>>t>>k;
if(k>105)
k=105;
while(k--)
x+=s;
if(x.find(t)!=string::npos)
cout<<"Yes";
else
cout<<"No";
return 0;
}
提交记录