(想法偏了,以后回来重写)
官方解答:
class Solution { public: bool repeatedSubstringPattern(string s) { return (s + s).find(s, 1) != s.size(); } };