02 2013 档案
-
poj 2945 Find the Clones
摘要:Find the ClonesTime Limit:5000MSMemory Limit:65536KTotal Submissions:6265Accepted:2328DescriptionDoubleville, a small town in Texas, was attacked by the aliens. They have abducted some of the residents and taken them to the a spaceship orbiting around earth. After some (quite unpleasant) human exper 阅读全文
-
poj 1056 IMMEDIATE DECODABILITY
摘要:IMMEDIATE DECODABILITYTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 9229Accepted: 4375DescriptionAn encoding of a set of symbols is said to be immediately decodable if no code for one symbol is the prefix of a code for another symbol. We will assume for this problem that all codes are in 阅读全文
-
poj 2503 Babelfish
摘要:BabelfishTime Limit:3000MSMemory Limit:65536KTotal Submissions:26498Accepted:11378DescriptionYou have just moved from Waterloo to a big city. The people here speak an incomprehensible dialect of a foreign language. Fortunately, you have a dictionary to help you understand them.InputInput consists of 阅读全文
-
poj 2001 Shortest Prefixes ——字典树入门
摘要:题目链接:http://poj.org/problem?id=2001题目大意: 给一系列单词,找出么每个单词的最小缩写,使得这些缩写不出现歧义。还有,完全相同的优先级比前缀的优先级高,意思就是,如果一个单词的缩写就是这个单词本身,那么它不能代表以它为前缀的单词,而仅仅代表它本身。题目思路: 第一道字典树题目,写代码还是要认真,出一些写错误是最吃亏的。减少错误的办法就是,第一,多敲代码,敲熟练一点儿,孰能生巧。第二,写代码的过程中要养成习惯,就是先把问题想透彻,再写,一边写一边思考。 1 #include <iostream> 2 #include <cstdio> 3 阅读全文
-
CF271 C. Secret
摘要:C. Secrettime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputThe Greatest Secret Ever consists ofnwords, indexed by positive integers from1ton. The secret needs dividing betweenkKeepers (let's index them by positive integers from1tok), thei-th Ke 阅读全文
-
CF271 A. Beautiful Year
摘要:A. Beautiful Yeartime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputIt seems like the year of 2013 came only yesterday. Do you know a curious fact? The year of 2013 is the first year after the old 1987 with only distinct digits.Now you are suggested 阅读全文
-
CF271 B. Prime Matrix
摘要:B. Prime Matrixtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputYou've got ann × mmatrix. The matrix consists of integers. In one move, you can apply a single transformation to the matrix: choose an arbitrary element of the matrix and inc 阅读全文