A Knight's JourneyTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15815Accepted: 5295DescriptionBackground The knight is getting bored of seeing the same black and white squares again and again and has decided to make a journey around the
Zero SumConsider the sequence of digits from 1 through N (where N=9) in increasing order: 1 2 3 ... N.Now insert either a `+' for addition or a `-' for subtraction or a ` ' [blank] to run the digits together between each pair of digits (not in front
1010: The Almost Lucky NumbersTime Limit: 1 Sec Memory Limit: 128 MBSubmit: 16 Solved: 11[Submit][Status][Web Board]DescriptionJohn and Brus believe that the digits 4 and 7 are lucky and all others are not. According to them, an almost lucky
分類:DP,遞推,記憶化搜尋作者:ACShiryu時間:2011-7-15Subset Sums JRMFor many sets of consecutive integers from 1 through N (1 <= N <= 39), one can partition the set into two sets whose sums are identical.For example, if N=3, one can partition the set {1, 2,
分類:圖論,最小產生樹作者:ACShiryu時間:2011-7-29原題:http://poj.org/problem?id=2485HighwaysTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12754Accepted: 5969DescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public
分類:圖論,最小覆蓋點作者:ACShiryu時間:2011-8-2原題:http://poj.org/problem?id=1325參考資料:Matrix67's Blog Machine ScheduleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 7612Accepted: 3207DescriptionAs we all know, machine scheduling is a very classical
分類:DFS,數學作者:ACShiryu時間:2011-7-24地址:ACShiryu's BlogFind The MultipleTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 9346Accepted: 3854Special JudgeDescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n
分類:數論作者:ACShiryu時間:2011-8-3原題:http://poj.org/problem?id=1142Smith NumbersTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8853Accepted: 3105DescriptionWhile skimming his phone directory in 1982, Albert Wilansky, a mathematician of Lehigh
Party Lamps IOI 98To brighten up the gala dinner of the IOI'98 we have a set of N (10 <= N <= 100) colored lamps numbered from 1 to N.The lamps are connected to four buttons:Button 1: When this button is pressed, all the lamps change their
作者:ACShiryu時間:2011-8-4原題:http://poj.org/problem?id=2262Goldbach's ConjectureTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 24877Accepted: 9798DescriptionIn 1742, Christian Goldbach, a German amateur mathematician, sent a letter to Leonhard
文章目錄 PROGRAM NAME: prefixINPUT FORMATSAMPLE INPUT (file prefix.in)OUTPUT FORMATSAMPLE OUTPUT (file prefix.out) 今天完全不行啊,USACO只做了一題,今天也只刷了兩題,USACO還卡題了Longest PrefixIOI'96The structure of some biological objects is
作者:ACShiryu時間:2011-8-4原題:http://poj.org/problem?id=2407RelativesTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 7396Accepted: 3402DescriptionGiven n, a positive integer, how many positive integers less than n are relatively prime to n? Two
分類:圖論,產生樹,Prim作者:ACShiryu時間:2011-7-29原題:http://poj.org/problem?id=1789Truck HistoryTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 9712Accepted: 3579DescriptionAdvanced Cargo Movement, Ltd. uses trucks of different types. Some trucks are
Binomial ShowdownTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14435Accepted: 4403DescriptionIn how many ways can you choose k elements out of n elements, not taking order into account? Write a program to compute this number.InputThe