2020暑期牛客多校第一场F.Infinite String Comparision(无限循环字符串比较字典序)

题目连接:https://ac.nowcoder.com/acm/contest/5666/F 解题思路: 转自https://www.cnblogs.com/fate-/p/13299779.htmlhtml 不是很理解,反正记住两个字符串a和b,长度分别为p和q,那么比较p+q-gcd(p,q)次,就能够获得a∞ 和b∞ 的字典序大小比较ios #include<iostream> #incl
相关文章
相关标签/搜索