2013年7月20日

POJ 1915 Knight Moves

摘要: Knight MovesTime Limit:1000MSMemory Limit:30000KTotal Submissions:19506Accepted:8986DescriptionBackgroundMr Somurolov, fabulous chess-gamer indeed, asserts that no one else but him can move knights from one position to another so fast. Can you beat him?The ProblemYour task is to write a program to c 阅读全文

posted @ 2013-07-20 17:00 lzm风雨无阻 阅读(785) 评论(0) 推荐(0) 编辑

POJ 1745 Divisibility

摘要: DivisibilityTime Limit:1000MSMemory Limit:10000KTotal Submissions:9476Accepted:3300DescriptionConsider an arbitrary sequence of integers. One can place + or - operators between integers in the sequence, thus deriving different arithmetical expressions that evaluate to different values. Let us, for e 阅读全文

posted @ 2013-07-20 14:47 lzm风雨无阻 阅读(343) 评论(0) 推荐(0) 编辑

POJ 1731 Orders

摘要: OrdersTime Limit:1000MSMemory Limit:10000KTotal Submissions:8656Accepted:5348DescriptionThe stores manager has sorted all kinds of goods in an alphabetical order of their labels. All the kinds having labels starting with the same letter are stored in the same warehouse (i.e. in the same building) la 阅读全文

posted @ 2013-07-20 11:41 lzm风雨无阻 阅读(385) 评论(0) 推荐(0) 编辑

POJ 1664 放苹果

摘要: 放苹果Time Limit:1000MSMemory Limit:10000KTotal Submissions:23639Accepted:14999Description把M个同样的苹果放在N个同样的盘子里,允许有的盘子空着不放,问共有多少种不同的分法?(用K表示)5,1,1和1,5,1 是同一种分法。Input第一行是测试数据的数目t(0 #include using namespace std;int n;int ans;int result;void DFS(int index, int from, int sum){ if (index == n) { i... 阅读全文

posted @ 2013-07-20 10:53 lzm风雨无阻 阅读(186) 评论(0) 推荐(0) 编辑

2013年7月19日

POJ 1606 Jugs

摘要: JugsTime Limit:1000MSMemory Limit:65536KTotal Submissions:4280Accepted:2533Special JudgeDescriptionIn the movie "Die Hard 3", Bruce Willis and Samuel L. Jackson were confronted with the following puzzle. They were given a 3-gallon jug and a 5-gallon jug and were asked to fill the 5-gallon 阅读全文

posted @ 2013-07-19 22:04 lzm风雨无阻 阅读(353) 评论(0) 推荐(0) 编辑

POJ 1543 Perfect Cubes

摘要: Perfect CubesTime Limit:1000MSMemory Limit:10000KTotal Submissions:12595Accepted:6707DescriptionFor hundreds of years Fermat's Last Theorem, which stated simply that for n > 2 there exist no integers a, b, c > 1 such that a^n = b^n + c^n, has remained elusively unproven. (A recent proof is 阅读全文

posted @ 2013-07-19 11:18 lzm风雨无阻 阅读(586) 评论(0) 推荐(0) 编辑

2013年7月18日

POJ 1256 Anagram

摘要: AnagramTime Limit:1000MSMemory Limit:10000KTotal Submissions:16533Accepted:6723DescriptionYou are to write a program that has to generate all possible words from a given set of letters.Example: Given the word "abc", your program should - by exploring all different combination of the three 阅读全文

posted @ 2013-07-18 16:20 lzm风雨无阻 阅读(597) 评论(0) 推荐(0) 编辑

2013年7月17日

POJ 1971 Parallelogram Counting

摘要: Parallelogram CountingTime Limit:5000MSMemory Limit:65536KTotal Submissions:5605Accepted:1885DescriptionThere are n distinct points in the plane, given by their integer coordinates. Find the number of parallelograms whose vertices lie on these points. In other words, find the number of 4-element sub 阅读全文

posted @ 2013-07-17 20:42 lzm风雨无阻 阅读(425) 评论(0) 推荐(0) 编辑

2013年7月15日

POJ 1007 DNA Sorting

摘要: DNA SortingTime Limit:1000MSMemory Limit:10000KTotal Submissions:74133Accepted:29661DescriptionOne measure of ``unsortedness'' in a sequence is the number of pairs of entries that are out of order with respect to each other. For instance, in the letter sequence ``DAABEC'', this measu 阅读全文

posted @ 2013-07-15 22:15 lzm风雨无阻 阅读(240) 评论(0) 推荐(0) 编辑

POJ 2388 Who's in the Middle

摘要: Who's in the MiddleTime Limit:1000MSMemory Limit:65536KTotal Submissions:27445Accepted:15856DescriptionFJ 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 阅读全文

posted @ 2013-07-15 20:56 lzm风雨无阻 阅读(472) 评论(0) 推荐(0) 编辑

POJ 2231 Moo Volume

摘要: Moo VolumeTime Limit:1000MSMemory Limit:65536KTotal Submissions:18163Accepted:5347DescriptionFarmer John has received a noise complaint from his neighbor, Farmer Bob, stating that his cows are making too much noise.FJ's N cows (1 #include #include #include using namespace std;int main(){ int n; 阅读全文

posted @ 2013-07-15 18:24 lzm风雨无阻 阅读(399) 评论(0) 推荐(0) 编辑

2013年7月14日

POJ 2092 Grandpa is Famous

摘要: Grandpa is FamousTime Limit:2000MSMemory Limit:30000KTotal Submissions:7153Accepted:3624DescriptionThe whole family was excited by the news. Everyone knew grandpa had been an extremely good bridge player for decades, but when it was announced he would be in the Guinness Book of World Records as the 阅读全文

posted @ 2013-07-14 17:01 lzm风雨无阻 阅读(1009) 评论(0) 推荐(0) 编辑

HDU 3065 病毒侵袭持续中

摘要: 病毒侵袭持续中Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 4389Accepted Submission(s): 1571Problem Description小t非常感谢大家帮忙解决了他的上一个问题。然而病毒侵袭持续中。在小t的不懈努力下,他发现了网路中的“万恶之源”。这是一个庞大的病毒网站,他有着好多好多的病毒,但是这个网站包含的病毒很奇怪,这些病毒的特征码很短,而且只包含“英文大写字符”。当然小t好想好想为民除害,但是小t从来不打没有 阅读全文

posted @ 2013-07-14 14:19 lzm风雨无阻 阅读(237) 评论(0) 推荐(0) 编辑

2013年7月11日

HDU 1277 全文检索

摘要: 全文检索Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 1048Accepted Submission(s): 324Problem Description我们大家经常用google检索信息,但是检索信息的程序是很困难编写的;现在请你编写一个简单的全文检索程序。问题的描述是这样的:给定一个信息流文件,信息完全有数字组成,数字个数不超过60000个,但也不少于60个;再给定一个关键字集合,其中关键字个数不超过10000个,每个关键字的信息数字不超 阅读全文

posted @ 2013-07-11 19:56 lzm风雨无阻 阅读(477) 评论(0) 推荐(0) 编辑

2013年7月10日

HDU 2896 病毒侵袭

摘要: 病毒侵袭Time Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 7449Accepted Submission(s): 1958Problem Description当太阳的光辉逐渐被月亮遮蔽,世界失去了光明,大地迎来最黑暗的时刻。。。。在这样的时刻,人们却异常兴奋——我们能在有生之年看到500年一遇的世界奇观,那是多么幸福的事儿啊~~但网路上总有那么些网站,开始借着民众的好奇心,打着介绍日食的旗号,大肆传播病毒。小t不幸成为受害者之一。小t如此生气, 阅读全文

posted @ 2013-07-10 20:38 lzm风雨无阻 阅读(217) 评论(0) 推荐(0) 编辑

HDU 2222 Keywords Search

摘要: Keywords SearchTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 25356Accepted Submission(s): 8280Problem DescriptionIn the modern time, Search engine came into the life of everybody like Google, Baidu, etc.Wiskey also wants to bring this feature to 阅读全文

posted @ 2013-07-10 14:42 lzm风雨无阻 阅读(1559) 评论(0) 推荐(0) 编辑

2013年7月9日

POJ 3356 AGTC

摘要: AGTCTime Limit:1000MSMemory Limit:65536KTotal Submissions:8101Accepted:3212DescriptionLetxandybe two strings over some finite alphabetA. We would like to transformxintoyallowing only operations given below:Deletion:a letter inxis missing inyat a corresponding position.Insertion:a letter inyis missin 阅读全文

posted @ 2013-07-09 17:03 lzm风雨无阻 阅读(233) 评论(0) 推荐(0) 编辑

POJ 2945 Find the Clones

摘要: Find the ClonesTime Limit:5000MSMemory Limit:65536KTotal Submissions:6365Accepted:2375DescriptionDoubleville, 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 阅读全文

posted @ 2013-07-09 15:33 lzm风雨无阻 阅读(485) 评论(3) 推荐(0) 编辑

2013年7月8日

POJ 2643 Election

摘要: ElectionTime Limit:1000MSMemory Limit:65536KTotal Submissions:3558Accepted:1692DescriptionCanada has a multi-party system of government. Each candidate is generally associated with a party, and the party whose candidates win the most ridings generally forms the government. Some candidates run as ind 阅读全文

posted @ 2013-07-08 21:53 lzm风雨无阻 阅读(420) 评论(0) 推荐(0) 编辑

POJ 2503 Babelfish

摘要: BabelfishTime Limit:3000MSMemory Limit:65536KTotal Submissions:27629Accepted:11948DescriptionYou 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 阅读全文

posted @ 2013-07-08 20:21 lzm风雨无阻 阅读(1181) 评论(0) 推荐(0) 编辑

2013年7月2日

POJ 2403 Hay Points

摘要: Hay PointsTime Limit:1000MSMemory Limit:65536KTotal Submissions:5735Accepted:3695DescriptionEach employee of a bureaucracy has a job description - a few paragraphs that describe the responsibilities of the job. The employee's job description, combined with other factors, such as seniority, is us 阅读全文

posted @ 2013-07-02 20:50 lzm风雨无阻 阅读(716) 评论(0) 推荐(0) 编辑

2013年7月1日

POJ 2359 Questions

摘要: QuestionsTime Limit:1000MSMemory Limit:65536KTotal Submissions:1228Accepted:449DescriptionHolding a collegiate programming contest is a very exhausting work. There is a well-known proverb that one fool can ask so many questions that a hundred clever men will not answer. And during a collegiate progr 阅读全文

posted @ 2013-07-01 22:36 lzm风雨无阻 阅读(240) 评论(0) 推荐(0) 编辑

2013年6月30日

POJ 2250 Compromise

摘要: CompromiseTime Limit:1000MSMemory Limit:65536KTotal Submissions:5486Accepted:2478Special JudgeDescriptionIn a few months the European Currency Union will become a reality. However, to join the club, the Maastricht criteria must be fulfilled, and this is not a trivial task for the countries (maybe ex 阅读全文

posted @ 2013-06-30 22:33 lzm风雨无阻 阅读(259) 评论(0) 推荐(0) 编辑

POJ 2192 Zipper

摘要: ZipperTime Limit:1000MSMemory Limit:65536KTotal Submissions:14193Accepted:4992DescriptionGiven three strings, you are to determine whether the third string can be formed by combining the characters in the first two strings. The first two strings can be mixed arbitrarily, but each must stay in its or 阅读全文

posted @ 2013-06-30 17:20 lzm风雨无阻 阅读(193) 评论(0) 推荐(0) 编辑

POJ 2001 Shortest Prefixes

摘要: Shortest PrefixesTime Limit:1000MSMemory Limit:30000KTotal Submissions:11052Accepted:4686DescriptionA prefix of a string is a substring starting at the beginning of the given string. The prefixes of "carbon" are: "c", "ca", "car", "carb", "carbo 阅读全文

posted @ 2013-06-30 11:43 lzm风雨无阻 阅读(557) 评论(0) 推荐(0) 编辑

POJ 1887 Testing the CATCHER

摘要: Testing the CATCHERTime Limit:1000MSMemory Limit:30000KTotal Submissions:13396Accepted:4905DescriptionA military contractor for the Department of Defense has just completed a series of preliminary tests for a new defensive missile called the CATCHER which is capable of intercepting multiple incoming 阅读全文

posted @ 2013-06-30 10:28 lzm风雨无阻 阅读(322) 评论(0) 推荐(0) 编辑

2013年6月29日

HDU 3374 String Problem

摘要: String ProblemTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1233Accepted Submission(s): 550Problem DescriptionGive you a string with length N, you can generate N strings by left shifts. For example let consider the string “SKYLONG”, we can genera 阅读全文

posted @ 2013-06-29 21:39 lzm风雨无阻 阅读(259) 评论(0) 推荐(0) 编辑

HDU 2609 How many

摘要: How manyTime Limit: 2000/1000 MS (Java/Others)Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 1005Accepted Submission(s): 392Problem DescriptionGive you n ( n 1100 -> 1001 -> 0011->0110.InputThe input contains multiple test cases.Each test case include: first one integers n. ( 阅读全文

posted @ 2013-06-29 20:42 lzm风雨无阻 阅读(305) 评论(0) 推荐(0) 编辑

POJ 1509 Glass Beads

摘要: Glass BeadsTime Limit:3000MSMemory Limit:10000KTotal Submissions:1902Accepted:1106DescriptionOnce upon a time there was a famous actress. As you may expect, she played mostly Antique Comedies most of all. All the people loved her. But she was not interested in the crowds. Her big hobby were beads of 阅读全文

posted @ 2013-06-29 17:17 lzm风雨无阻 阅读(272) 评论(0) 推荐(0) 编辑

POJ 1458 Common Subsequence

摘要: Common SubsequenceTime Limit:1000MSMemory Limit:10000KTotal Submissions:33069Accepted:12966DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence Z = is a subsequence of X if there exists a strictly incr.. 阅读全文

posted @ 2013-06-29 15:31 lzm风雨无阻 阅读(298) 评论(0) 推荐(0) 编辑

POJ 1159 Palindrome

摘要: PalindromeTime Limit:3000MSMemory Limit:65536KTotal Submissions:46951Accepted:16058DescriptionA palindrome is a symmetrical string, that is, a string read identically from left to right as well as from right to left. You are to write a program which, given a string, determines the minimal number of 阅读全文

posted @ 2013-06-29 11:51 lzm风雨无阻 阅读(228) 评论(0) 推荐(0) 编辑

POJ 1056 IMMEDIATE DECODABILITY

摘要: IMMEDIATE DECODABILITYTime Limit:1000MSMemory Limit:10000KTotal Submissions:9630Accepted:4555DescriptionAn 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 bina 阅读全文

posted @ 2013-06-29 11:03 lzm风雨无阻 阅读(521) 评论(0) 推荐(0) 编辑

2013年6月28日

POJ 3080 Blue Jeans

摘要: Blue JeansTime Limit:1000MSMemory Limit:65536KTotal Submissions:9644Accepted:4064DescriptionThe Genographic Project is a research partnership between IBM and The National Geographic Society that is analyzing DNA from hundreds of thousands of contributors to map how the Earth was populated.As an IBM 阅读全文

posted @ 2013-06-28 22:06 lzm风雨无阻 阅读(237) 评论(0) 推荐(0) 编辑

POJ 1200 Crazy Search

摘要: Crazy SearchTime Limit:1000MSMemory Limit:65536KTotal Submissions:20305Accepted:5751DescriptionMany people like to solve hard puzzles some of which may lead them to madness. One such puzzle could be finding a hidden prime number in a given text. Such number could be the number of different substring 阅读全文

posted @ 2013-06-28 16:58 lzm风雨无阻 阅读(421) 评论(0) 推荐(0) 编辑

2013年6月3日

POJ 1226 Substrings

摘要: SubstringsTime Limit:1000MSMemory Limit:10000KTotal Submissions:10262Accepted:3525DescriptionYou are given a number of case-sensitive strings of alphabetic characters, find the largest string X, such that either X, or its inverse can be found as a substring of any of the given strings.InputThe first 阅读全文

posted @ 2013-06-03 16:36 lzm风雨无阻 阅读(548) 评论(0) 推荐(0) 编辑

2013年6月2日

POJ 1961 Period

摘要: PeriodTime Limit:3000MSMemory Limit:30000KTotal Submissions:10858Accepted:4997DescriptionFor each prefix of a given string S with N characters (each character has an ASCII code between 97 and 126, inclusive), we want to know whether the prefix is a periodic string. That is, for each i (2 <= i < 阅读全文

posted @ 2013-06-02 22:19 lzm风雨无阻 阅读(150) 评论(0) 推荐(0) 编辑

POJ 2752 Seek the Name, Seek the Fame

摘要: Seek the Name, Seek the FameTime Limit:2000MSMemory Limit:65536KTotal Submissions:9446Accepted:4516DescriptionThe little cat is so famous, that many couples tramp over hill and dale to Byteland, and asked the little cat to give names to their newly-born babies. They seek the name, and at the same ti 阅读全文

posted @ 2013-06-02 19:46 lzm风雨无阻 阅读(243) 评论(0) 推荐(0) 编辑

POJ 2406 Power Strings

摘要: Power StringsTime Limit:3000MSMemory Limit:65536KTotal Submissions:26444Accepted:11072DescriptionGiven two strings a and b we define a*b to be their concatenation. For example, if a = "abc" and b = "def" then a*b = "abcdef". If we think of concatenation as multiplicatio 阅读全文

posted @ 2013-06-02 16:54 lzm风雨无阻 阅读(195) 评论(0) 推荐(0) 编辑

POJ 3461 Oulipo

摘要: OulipoTime Limit:1000MSMemory Limit:65536KTotal Submissions:16111Accepted:6482DescriptionThe French author Georges Perec (1936–1982) once wrote a book, La disparition, without the letter'e'. He was a member of the Oulipo group. A quote from the book:Tout avait Pair normal, mais tout s’affirm 阅读全文

posted @ 2013-06-02 16:18 lzm风雨无阻 阅读(136) 评论(0) 推荐(0) 编辑

POJ 2155 Matrix

摘要: MatrixTime Limit:3000MSMemory Limit:65536KTotal Submissions:14330Accepted:5411DescriptionGiven an N*N matrix A, whose elements are either 0 or 1. A[i, j] means the number in the i-th row and j-th column. Initially we have A[i, j] = 0 (1 #include #include using namespace std;#define MAXNUM 1005int .. 阅读全文

posted @ 2013-06-02 10:27 lzm风雨无阻 阅读(152) 评论(0) 推荐(0) 编辑

导航