摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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. (
阅读全文
摘要: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
阅读全文
摘要: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..
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 <
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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
阅读全文
摘要: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 ..
阅读全文
摘要:Mobile phonesTime Limit:5000MSMemory Limit:65536KTotal Submissions:12394Accepted:5710DescriptionSuppose 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 numbered
阅读全文
摘要:JapanTime Limit:1000MSMemory Limit:65536KTotal Submissions:16884Accepted:4530DescriptionJapan 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 #include #include using name
阅读全文
摘要:StarsTime Limit:1000MSMemory Limit:65536KTotal Submissions:25850Accepted:11292DescriptionAstronomers 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 the
阅读全文
摘要:CowsTime Limit:3000MSMemory Limit:65536KTotal Submissions:9840Accepted:3220DescriptionFarmer 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 numbe
阅读全文