字符串移位包含问题(使用find,无自定义函数,方法简单)
#include<bits/stdc++.h>
using namespace std;
int main(){
string a, b;
cin >> a >> b;
int la = a.length();
int lb = b.length();
if(la < lb){
swap(a, b);
}
string doubleA = a + a;
if(doubleA.find(b) != string::npos) cout << "true";
else cout << "false";
return 0;
}