现在的位置: 首页 > 综合 > 正文

NEFU 697 2013内蒙古自治区赛–热身赛 E题

2013年08月13日 ⁄ 综合 ⁄ 共 260字 ⁄ 字号 评论关闭

擦,这题,现场用kmp被卡了。。。唉,还是不稳定,写错了。。。能力不足,但是在结束的3min敲了个无脑的暴力。擦你妹的过了,蛋疼啊,节操何在。

#include <iostream>
#include <string>

using namespace std;

int main()
{
 string s1,s2;
 while(cin>>s1>>s2)
 {
  s1=s1+s1;
  int a=s1.find(s2);
  if(a>0) cout<<"yes"<<endl;
  else cout<<"no"<<endl;
 }
 return 0;
}

 

【上篇】
【下篇】

抱歉!评论已关闭.