摘要:Crashing RobotsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 5453Accepted: 2382DescriptionIn a modernized warehouse, robots are used to fetch the goods. Careful planning is needed to ensure that the robots reach their destinations without crashing into each other. Of course, all warehouse
阅读全文
摘要:ParencodingsTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 15075Accepted: 8989DescriptionLet S = s1 s2...s2n be a well-formed string of parentheses. S can be encoded in two different ways: q By an integer sequence P = p1 p2...pn where pi is the number of left parentheses before the ith rig
阅读全文
摘要:EightTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 18387Accepted: 8182Special JudgeDescriptionThe 15-puzzle has been around for over 100 years; even if you don't know it by that name, you've seen it. It is constructed with 15 sliding tiles, each with a number from 1 to 15 on it, a
阅读全文
摘要:HDU 1043 和 POJ 1077 两题类似。。。但是输入不同。HDU 上是同时多组输入,POJ是单组输入。两个限时不同。HDU 上反向搜索,把所有情况打表出来。POJ上正向搜索。这个题很经典,还需要继续做。先把第一次写的代码贴出来吧。继续优化中HDU 1043EightTime Limit: 10000/5000 MS (Java/Others)Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7145Accepted Submission(s): 1946Special JudgeProblem Descript
阅读全文
摘要:Balanced LineupTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 23699Accepted: 11019Case Time Limit: 2000MSDescriptionFor the daily milking, Farmer John's N cows (1 ≤ N ≤ 50,000) always line up in the same order. One day Farmer John decides to organize a game of Ultimate Frisbee with som
阅读全文
摘要:SumdivTime Limit: 1000MSMemory Limit: 30000KTotal Submissions: 10071Accepted: 2357DescriptionConsider two natural numbers A and B. Let S be the sum of all natural divisors of A^B. Determine S modulo 9901 (the rest of the division of S by 9901).InputThe only line contains the two natural numbers A an
阅读全文
摘要:JapanTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 14795Accepted: 3968DescriptionJapan plans to welcome the ACM ICPC World Finals and a lot of roads must be built for the venue. Japan is tall island with N cities on the East coast and M cities on the West coast (M <= 1000, N <= 1000
阅读全文
摘要:CowsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 8497Accepted: 2777DescriptionFarmer John's cows have discovered that the clover growing along the ridge of the hill (which we can think of as a one-dimensional number line) in his field is particularly good. Farmer John has N cows (we
阅读全文
摘要:Mobile phonesTime Limit: 5000MSMemory Limit: 65536KTotal Submissions: 11018Accepted: 5044DescriptionSuppose that the fourth generation mobile phone base stations in the Tampere area operate as follows. The area is divided into squares. The squares form an S * S matrix with the rows and columns numbe
阅读全文
摘要:StarsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 22464Accepted: 9787DescriptionAstronomers often examine star maps where stars are represented by points on a plane and each star has Cartesian coordinates. Let the level of a star be an amount of the stars that are not higher and not to t
阅读全文
摘要:Ultra-QuickSortTime Limit: 7000MSMemory Limit: 65536KTotal Submissions: 27665Accepted: 9915DescriptionIn 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
阅读全文
摘要:Colored SticksTime Limit: 5000MSMemory Limit: 128000KTotal Submissions: 24748Accepted: 6519DescriptionYou are given a bunch of wooden sticks. Each endpoint of each stick is colored with some color. Is it possible to align the sticks in a straight line such that the colors of the endpoints that touch
阅读全文
摘要:Power StringsTime Limit: 3000MSMemory Limit: 65536KTotal Submissions: 23112Accepted: 9691DescriptionGiven 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 multiplica
阅读全文
摘要:PeriodTime Limit: 3000MSMemory Limit: 30000KTotal Submissions: 9696Accepted: 4428DescriptionFor each prefix of a given string S with N characters (eac...
阅读全文
摘要:OulipoTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 12818Accepted: 5128DescriptionThe 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’a
阅读全文
摘要:IMMEDIATE DECODABILITYTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 8895Accepted: 4222DescriptionAn 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
阅读全文
摘要:Reduced ID NumbersTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 7494Accepted: 3029DescriptionT. Chur teaches various groups of students at university U. Every U-student has a unique Student Identification Number (SIN). A SIN s is an integer in the range 0 ≤ s ≤ MaxSIN with MaxSIN = 106-1.
阅读全文
摘要:PyramidsTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 2268Accepted: 751Special JudgeDescriptionRecently in Farland, a country in Asia, a famous scientist Mr. Log Archeo has discovered ancient pyramids. But unlike those in Egypt and Central America, they have triangular (not rectangular) f
阅读全文
摘要:WallTime Limit: 1000MSMemory Limit: 10000KTotal Submissions: 21502Accepted: 7048DescriptionOnce upon a time there was a greedy King who ordered his chief Architect to build a wall around the King's castle. The King was so greedy, that he would not listen to his Architect's proposals to build
阅读全文
摘要:The Embarrassed CryptographerTime Limit: 2000MSMemory Limit: 65536KTotal Submissions: 9291Accepted: 2403DescriptionThe young and very promising cryptographer Odd Even has implemented the security module of a large system with thousands of users, which is now in use in his company. The cryptographic
阅读全文