文章

27

粉丝

0

获赞

130

访问

8.3k

头像
循环移位 题解:拼接后遍历
jsd VIP
P1727 中山大学机试题
发布于2025年3月19日 15:01
阅读数 185

#include<bits/stdc++.h>
using namespace std;

int main() {
    string s1, s2;
    while(cin>>s1>>s2) {
        string str;
        str += s2 + s2;
        if(str.find(s1) != string::npos) {
            cout<<"yes"<<endl;
        } else {
            cout<<"no"<<endl;
        }
    }

    return 0;
}

登录查看完整内容


登录后发布评论

暂无评论,来抢沙发