上一页 1 2 3 4 5 6 7 8 ··· 15 下一页
摘要: 题目就不贴了。都是一样的套路求解a^x % c = b的最小x 注意HDU的题目很坑,有b比c大和题目中输出信息为全角引号的坑 下面贴的是HDU的版本,poj的改一下a,b,c顺序和输出就好 #include <iostream> #include <cstring> #include <algor 阅读全文
posted @ 2017-08-21 13:55 Crutain 阅读(144) 评论(0) 推荐(0)
摘要: Problem Description Rikka and Yuta are interested in Phi function (which is known as Euler's totient function).Yuta gives Rikka an array A[1..n] of po 阅读全文
posted @ 2017-08-20 14:32 Crutain 阅读(173) 评论(0) 推荐(0)
摘要: 题目描述 协会活动为了活跃气氛,组织者举行了一个别开生面、奖品丰厚的抽奖活动,这个活动的具体要求是这样的:首先,所有参加晚会的人员都将一张写有自己名字的字条放入抽奖箱中;然后,待所有字条加入完毕,每人从箱中取一个字条;最后,如果取得的字条上写的就是自己的名字,那么“恭喜你,中奖了!” 大家可以想象一 阅读全文
posted @ 2017-08-18 16:16 Crutain 阅读(146) 评论(0) 推荐(0)
摘要: Problem Description Recently in Teddy's hometown there is a competition named "Cow Year Blow Cow".N competitors had took part in this competition.The 阅读全文
posted @ 2017-08-18 15:56 Crutain 阅读(161) 评论(0) 推荐(0)
摘要: Problem Description A murder happened in the hotel. As the best detective in the town, you should examine all the N rooms of the hotel immediately. Ho 阅读全文
posted @ 2017-08-18 14:50 Crutain 阅读(104) 评论(0) 推荐(0)
摘要: Description A lattice point (x, y) in the first quadrant (x and y are integers greater than or equal to 0), other than the origin, is visible from the 阅读全文
posted @ 2017-08-17 23:54 Crutain 阅读(129) 评论(0) 推荐(0)
摘要: Description 根据一些书上的记载,上帝的一次失败的创世经历是这样的: 第一天, 上帝创造了一个世界的基本元素,称做“元”。 第二天, 上帝创造了一个新的元素,称作“α”。“α”被定义为“元”构成的集合。容易发现,一共有两种不同的“α”。 第三天, 上帝又创造了一个新的元素,称作“β”。“β 阅读全文
posted @ 2017-08-17 23:36 Crutain 阅读(163) 评论(0) 推荐(0)
摘要: Problem Description Sample Input 2 2 Sample Output 2 Hint 1. For N = 2, S(1) = S(2) = 1. 2. The input file consists of multiple test cases. 2 Hint 1. 阅读全文
posted @ 2017-08-17 16:06 Crutain 阅读(96) 评论(0) 推荐(0)
摘要: Problem Description Emily the entrepreneur has a cool business idea: packaging and selling snowflakes. She has devised a machine that captures snowfla 阅读全文
posted @ 2017-08-17 11:40 Crutain 阅读(137) 评论(0) 推荐(0)
摘要: A ring is compose of n circles as shown in diagram. Put natural number 1, 2, ..., n into each circle separately, and the sum of numbers in two adjacen 阅读全文
posted @ 2017-08-09 23:29 Crutain 阅读(104) 评论(0) 推荐(0)
上一页 1 2 3 4 5 6 7 8 ··· 15 下一页