摘要: A. Modulo Ruins the Legend 因为是%m的意义下 我们尽量一直保持在%意义下 不然会很难注意一些不合法情况 原式可变形为(n*(n+1)/2 d + ns + sum )%m 最小 我们设a=n*(n+1)/2 b=n (ad+bs+sum)%m 设g1=gcd(a,b) 里 阅读全文
posted @ 2022-12-08 22:25 ycllz 阅读(507) 评论(0) 推荐(0)