随笔分类 - 分治
摘要:Iahub and Sorin are the best competitive programmers in their town. However, they can't both qualify to an important contest. The selection will be ma
阅读全文
摘要:A number sequence is defined as follows: f(1) = 1, f(2) = 1, f(n) = (A f(n 1) + B f(n 2)) mod 7. Given A, B, and n, you are to calculate the value of
阅读全文
摘要:Have you ever played quoit in a playground? Quoit is a game in which flat rings are pitched at some toys, with all the toys encircled awarded. In the
阅读全文