摘要: Give you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can generate seven strin 阅读全文
posted @ 2019-01-25 21:47 Frontierone 阅读(125) 评论(0) 推荐(0) 编辑
摘要: Give you n ( n < 10000) necklaces ,the length of necklace will not large than 100,tell me How many kinds of necklaces total have.(if two necklaces can 阅读全文
posted @ 2019-01-25 17:11 Frontierone 阅读(159) 评论(0) 推荐(0) 编辑
摘要: 链接:https://ac.nowcoder.com/acm/contest/317/D 首先被数学题吓到了。gcd(n,x)==1 那么必定有 gcd(n,n-x)==1 证明略。 并且两个人的对答案贡献一样。 对于A来说 ,A*ka *k(n-a) * kb *k(n-b) = A*kRn 转化 阅读全文
posted @ 2019-01-25 15:07 Frontierone 阅读(153) 评论(0) 推荐(0) 编辑