随笔分类 - POJ
http://poj.org/
摘要:Find them, Catch themTime Limit:1000MSMemory Limit:10000KTotal Submissions:24844Accepted:7457DescriptionThe police office in Tadu City decides to say ends to the chaos, as launch actions to root up the TWO gangs in the city, Gang Dragon and Gang Snake. However, the police first needs to identify whi
阅读全文
摘要:Spell checkerTime Limit:2000MSMemory Limit:65536KTotal Submissions:16225Accepted:5938DescriptionYou, as a member of a development team for a new spell checking program, are to write a module that will check the correctness of given words using a known dictionary of all correct words in all their for
阅读全文
摘要:Round and Round We GoTime Limit:1000MSMemory Limit:10000KTotal Submissions:11201Accepted:5181DescriptionA cyclic number is an integer n digits in length which, when multiplied by any integer from 1 to n, yields a"cycle"of the digits of the original number. That is, if you consider the numb
阅读全文
摘要:Ultra-QuickSortTime Limit:7000MSMemory Limit:65536KTotal Submissions:32626Accepted:11642DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping two adjacent sequence elements until the sequence is sorted in
阅读全文
摘要:Fence RepairTime Limit:2000MSMemory Limit:65536KTotal Submissions:18686Accepted:5948DescriptionFarmer John wants to repair a small length of the fence around the pasture. He measures the fence and finds that he needsN(1 ≤N≤ 20,000) planks of wood, each having some integer lengthLi(1 ≤Li≤ 50,000) uni
阅读全文
摘要:Who's in the MiddleTime Limit:1000MSMemory Limit:65536KTotal Submissions:26878Accepted:15526DescriptionFJ is surveying his herd to find the most average cow. He wants to know how much milk this 'median' cow gives: half of the cows give as much or more than the median; half give as much o
阅读全文
摘要:HighwaysTime Limit:1000MSMemory Limit:65536KTotal Submissions:18115Accepted:8420DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem. They're planning
阅读全文
摘要:Goldbach's ConjectureTime Limit:1000MSMemory Limit:65536KTotal Submissions:33082Accepted:12691DescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard Euler in which he made the following conjecture:Every even number greater than 4 can be written as the s
阅读全文
摘要:WatchcowTime Limit:3000MSMemory Limit:65536KTotal Submissions:5178Accepted:2171Special JudgeDescriptionBessie's been appointed the new watch-cow for the farm. Every night, it's her job to walk across the farm and make sure that no evildoers are doing any evil. She begins at the barn, makes h
阅读全文
摘要:The SuspectsTime Limit:1000MSMemory Limit:20000KTotal Submissions:17669Accepted:8547DescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separa
阅读全文
摘要:When Can We Meet?Time Limit:1000MSMemory Limit:30000KTotal Submissions:4405Accepted:2412DescriptionThe ICPC committee would like to have its meeting as soon as possible to address every little issue of the next contest. However, members of the committee are so busy maniacally developing (possibly us
阅读全文
摘要:BabelfishTime Limit:3000MSMemory Limit:65536KTotal Submissions:27391Accepted:11827DescriptionYou 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
阅读全文
摘要:食物链Time Limit:1000MSMemory Limit:10000KTotal Submissions:34498Accepted:10026Description动物王国中有三类动物A,B,C,这三类动物的食物链构成了有趣的环形。A吃B, B吃C,C吃A。 现有N个动物,以1-N编号。每个动物都是A,B,C中的一种,但是我们并不知道它到底是哪一种。 有人用两种说法对这N个动物所构成的食物链关系进行描述: 第一种说法是"1 X Y",表示X和Y是同类。 第二种说法是"2 X Y",表示X吃Y。 此人对N个动物,用上述两种说法,一句接一句地说出K
阅读全文
摘要:根据关键字进行字符串拷贝Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 4633Accepted: 1021Description把源字符串拷贝到目的字符串,如果指定关键字,则以该关键字结束(不包括关键字本身),如果拷贝失败,则得到空串。 具体要求:实现如下函数原型SafeStrcpy2KeyWord(),并在代码中调用该函数实现上述功能。该函数的实现要考虑各种可能的参数取值,以确保程序不出现崩溃。 int SafeStrcpy2KeyWord(char* pDestBuffer, //拷贝的目的地地址 cha...
阅读全文
摘要:时间日期格式转换Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6582Accepted: 3079Description世 界各地有多种格式来表示日期和时间。对于日期的常用格式,在中国常采用格式的是“年年年年/月月/日日”或写为英语缩略表示的”yyyy/mm/dd”, 此次编程大赛的启动日期“2009/11/07”就是符合这种格式的一个日期,而北美所用的日期格式则为“月月/日日/年年年年”或”mm/dd /yyyy”,如将“2009/11/07”改成这种格式,对应的则是”11/07/2009”。对于时间的格式,则常有12小时制
阅读全文
摘要:破译密码Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7014Accepted: 4406Description据说最早的密码来自于罗马的凯撒大帝。消息加密的办法是:对消息原文中的每个字母,分别用该字母之后的第5个字母替换(例如:消息原文中的每个字母A都分别替换成字母F)。而你要获得消息原文,也就是要将这个过程反过来。密码字母:A B C D E F G H I J K L M N O P Q R S T U V W X Y Z原文字母:V W X Y Z A B C D E F G H I J K L M N O P Q R
阅读全文
摘要:字母旋转游戏Time Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7053Accepted: 2642Description给定两个整数M,N,生成一个M*N的矩阵,矩阵中元素取值为A至Z的26个字母中的一个,A在左上角,其余各数按顺时针方向旋转前进,依次递增放置,当超过26时又从A开始填充。例如,当M=5,N=8时,矩阵中的内容如下: A B C D E F G H V W X Y Z A B I U J K L M N C J ...
阅读全文
摘要:The Circumference of the CircleTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 6480Accepted: 4077DescriptionTo calculate the circumference of a circle seems to be an easy task - provided you know its diameter. But what if you don't? You are given the cartesian coordinates of three non-c
阅读全文
摘要:Pre-Post-erous!Time Limit: 1000MSMemory Limit: 10000KTotal Submissions: 1976Accepted: 1206DescriptionWe are all familiar with pre-order, in-order and post-order traversals of binary trees. A common problem in data structure classes is to find the pre-order traversal of a binary tree when given the i
阅读全文
摘要:Tree RecoveryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 9354Accepted: 5868DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in the nodes. This is an example of one of her creation
阅读全文

浙公网安备 33010602011771号