摘要: River HopscotchTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 5961Accepted: 2579DescriptionEvery year the cows hold an event featuring a peculiar version of hopscotch that involves carefully jumping from rock to rock in a river. The excitement takes place on a long, straight river with a r 阅读全文
posted @ 2014-03-13 19:46 hyx1 阅读(149) 评论(0) 推荐(0) 编辑
摘要: Monthly ExpenseTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 12122Accepted: 4932DescriptionFarmer John is an astounding accounting wizard and has realized he might run out of money to run the farm. He has already calculated and recorded the exact amount of money (1 ≤ moneyi ≤ 10,000) that 阅读全文
posted @ 2014-03-13 19:15 hyx1 阅读(213) 评论(0) 推荐(0) 编辑
摘要: Dead FractionTime Limit:1000MSMemory Limit:30000KTotal Submissions:1762Accepted:568DescriptionMike is frantically scrambling to finish his thesis at the last minute. He needs to assemble all his research notes into vaguely coherent form in the next 3 days. Unfortunately, he notices that he had been 阅读全文
posted @ 2014-03-12 22:27 hyx1 阅读(215) 评论(0) 推荐(0) 编辑
摘要: Raising Modulo NumbersTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 4271Accepted: 2433DescriptionPeople are different. Some secretly read magazines full of interesting girls' pictures, others create an A-bomb in their cellar, others like using Windows, and some like difficult mathemat 阅读全文
posted @ 2014-03-12 10:16 hyx1 阅读(236) 评论(0) 推荐(0) 编辑
摘要: D. Roman and Numberstime limit per test4 secondsmemory limit per test512 megabytesinputstandard inputoutputstandard outputRoman is a young mathematician, very famous in Uzhland. Unfortunately, Sereja doesn't think so. To make Sereja change his mind, Roman is ready to solve any mathematical probl 阅读全文
posted @ 2014-03-11 22:26 hyx1 阅读(473) 评论(0) 推荐(0) 编辑
摘要: Pseudoprime numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6044Accepted: 2421DescriptionFermat's theorem states that for any prime number p and for any integer a > 1, ap = a (mod p). That is, if we raise a to the pth power and divide by p, the remainder is a. Some (but not ve 阅读全文
posted @ 2014-03-10 20:55 hyx1 阅读(219) 评论(0) 推荐(0) 编辑
摘要: Semi-prime H-numbersTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7059Accepted: 3030DescriptionThis problem is based on an exercise of David Hilbert, who pedagogically suggested that one study the theory of 4n+1 numbers. Here, we do only a bit of that.An H-number is a positive number whic 阅读全文
posted @ 2014-03-10 20:29 hyx1 阅读(377) 评论(0) 推荐(0) 编辑
摘要: X-factor ChainsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5111Accepted: 1622DescriptionGiven a positive integer X, an X-factor chain of length m is a sequence of integers,1 = X0, X1, X2, …, Xm = XsatisfyingXi 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 #define m... 阅读全文
posted @ 2014-03-10 19:58 hyx1 阅读(490) 评论(0) 推荐(0) 编辑
摘要: Prime PathTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 10320Accepted: 5897DescriptionThe ministers of the cabinet were quite upset by the message from the Chief of Security stating that they would all have to change the four-digit room numbers on their offices. — It is a matter of securi 阅读全文
posted @ 2014-03-10 18:53 hyx1 阅读(157) 评论(0) 推荐(0) 编辑
摘要: Prime NumberTime Limit : 1 sec, Memory Limit : 65536 KB Japanese version is herePrime NumberWrite a program which reads an integer n and prints the number of prime numbers which are less than or equal to n. A prime number is a natural number which has exactly two distinct natural number divisors: 1 阅读全文
posted @ 2014-03-09 15:02 hyx1 阅读(190) 评论(0) 推荐(0) 编辑