class Solution { public: /** * 旋转字符串 * @param A string字符串 * @param B string字符串 * @return bool布尔型 */

bool solve(string A, string B) {
    // write code here
    if(A == B)
    {
        return true;
    }
    if(B.empty()) return false;
    
    for(int i = 0; i < A.size(); i ++ )
    {
        string tmp = "";
        for(int j = i + 1; j < A.size();j ++ )
        {
            string tmp2 = A.substr(j, A.size());
            tmp = A.substr(i, j);
            if((tmp2 + tmp) == B)
            {
                return true;
            }
        }
    }
    return false;
}

};