随笔分类 -  ACM-ZOJ

摘要:Cinema in AkibaTime Limit:3 Seconds Memory Limit:65536 KBCinema in Akiba (CIA)is a small but very popular cinema inAkihabara. Every night the cinema is full of people. The layout ofCIAis very interesting, as there is only one row so that every audience can enjoy the wonderful movies without any anno 阅读全文
posted @ 2012-08-26 23:07 mtry 阅读(442) 评论(0) 推荐(0)
摘要:InformationTime Limit:2 Seconds Memory Limit:32768 KBIt is a war between Country Alpha and Country Beta. Country Alpha gets following information about Country Beta:Country Beta has n (2 <= n <= 100) cities numbered from 0 to n-1. Each city has a transmitter and a receiver. One city is able to 阅读全文
posted @ 2012-08-06 10:43 mtry 阅读(422) 评论(0) 推荐(0)
摘要:Treasure Hunt IIITime Limit:2 Seconds Memory Limit:65536 KBAlice is exploring the wonderland once again and she finds a strange house. In the house, there arenrooms which form a circle so that each room is connected to its two neighbour room. For exmaple, if Alice is in room 2, then she can go into 阅读全文
posted @ 2012-08-04 23:15 mtry 阅读(310) 评论(0) 推荐(0)
摘要:Humble NumbersTime Limit: 2 Seconds Memory Limit: 65536 KBA number whose only prime factors are 2,3,5 or 7 is called a humblenumber. The sequence 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 12, 14, 15, 16, 18, 20, 21, 24, 25, 27, ... shows the first 20 humble numbers.Write a program to find and print the nth el. 阅读全文
posted @ 2012-04-10 23:04 mtry 阅读(291) 评论(0) 推荐(0)
摘要:LottoTime Limit: 2 Seconds Memory Limit: 65536 KBIn a Lotto I have ever played, one has to select 6 numbers from the set {1,2,...,49}. A popular strategy to play Lotto - although it doesn't increase your chance of winning - is to select a subset S containing k (k>6) of these 49 numbers, and t 阅读全文
posted @ 2012-04-10 21:10 mtry 阅读(667) 评论(0) 推荐(0)
摘要:Sexagenary CycleTime Limit: 2 Seconds Memory Limit: 65536 KBThe Chinese sexagenary cycle, also known as the stems-and-branches, is a cycle of sixty terms used for recording days or years. Each term in the sexagenary cycle consists of two Chinese characters, the first representing a term from a cycl. 阅读全文
posted @ 2012-04-09 00:33 mtry 阅读(7807) 评论(0) 推荐(0)
摘要:NimTime Limit: 3 Seconds Memory Limit: 65536 KBNim is a mathematical game of strategy in which two players take turns removing objects from distinct heaps. The game ends when one of the players is unable to remove object in his/her turn. This player will then lose. On each turn, a player must remov. 阅读全文
posted @ 2012-04-09 00:28 mtry 阅读(409) 评论(0) 推荐(0)
摘要:-3+1Time Limit: 2 Seconds Memory Limit: 65536 KBZOJ is 10 years old! For celebrating, we are offering the easiest problem in the world to you.Recently we received a long sequence. We can modify the sequence once by the following two steps.Choose any element in the sequence, say x(satisfying x ≥ 3),. 阅读全文
posted @ 2012-03-12 21:45 mtry 阅读(542) 评论(0) 推荐(0)
摘要:Under AttackTime Limit: 10 Seconds Memory Limit: 65536 KBDoctor serves at a military air force base. One day, the enemy launch a sudden attack and the base is under heavy fire. The fighters in the airport must take off to intercept enemy bombers. However, the enemies know this clearly and they now . 阅读全文
posted @ 2012-02-26 13:27 mtry 阅读(292) 评论(0) 推荐(0)