DescriptionGiven 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 multiplication, exponentiation by a non-negative integer is defined in the
Tempter of the Bone IITime Limit: 10000/5000 MS (Java/Others) Memory Limit: 98304/32768 K (Java/Others)Total Submission(s): 1128 Accepted Submission(s): 282Problem DescriptionThe doggie found a bone in an ancient maze, which fascinated him a
Problem DescriptionClairewd is a member of FBI. After several years concealing in BUPT, she intercepted some important messages and she was preparing for sending it to ykwd. They had agreed that each letter of these messages would be transfered to
Proud MerchantsTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 131072/65536 K (Java/Others)Total Submission(s): 1672 Accepted Submission(s): 671Problem DescriptionRecently, iSea went to an ancient country. For such a long time, it was the
B. Maximum Absurditytime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputReforms continue entering Berland. For example, during yesterday sitting the Berland Parliament approved as much as n laws
A. k-Stringtime limit per test2 secondsmemory limit per test256 megabytesinputstandard inputoutputstandard outputA string is called a k-string if it can be represented as k concatenated copies of some string. For example, the string "aabaabaabaab"
FatMouse and CheeseTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3509 Accepted Submission(s): 1388Problem DescriptionFatMouse has stored some cheese in a city. The city can be considered
SolitaireTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2611 Accepted Submission(s): 850Problem DescriptionSolitaire is a game played on a chessboard 8x8. The rows and columns of the
RelocationTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 1479 Accepted: 597DescriptionEmma and Eric are moving to their new house they bought after returning from their honeymoon. Fortunately, they have a few friends helping them relocate.
SticksTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 4652 Accepted Submission(s): 1285Problem DescriptionGeorge took sticks of the same length and cut them randomly until all parts became
Gnome TetravexTime Limit: 10 Seconds Memory Limit: 32768 KB Hart is engaged in playing an interesting game, Gnome Tetravex, these days. In the game, at the beginning, the player is given n*n squares. Each square is divided into four triangles
RemainderTime Limit: 6000/3000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 2039 Accepted Submission(s): 436Problem DescriptionCoco is a clever boy, who is good at mathematics. However, he is puzzled by a
Largest Rectangle in a HistogramTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 7496 Accepted Submission(s): 2106Problem DescriptionA histogram is a polygon composed of a sequence of
What Are You Talking AboutTime Limit: 10000/5000 MS (Java/Others) Memory Limit: 102400/204800 K (Java/Others)Total Submission(s): 9527 Accepted Submission(s): 2975Problem DescriptionIgnatius is so lucky that he met a Martian yesterday. But he
City GameTime Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 3264 Accepted Submission(s): 1344Problem DescriptionBob is a strategy game programming specialist. In his new city building game the
Bloxorz ITime Limit: 2000MS Memory Limit: 65536KTotal Submissions: 4808 Accepted: 1592DescriptionLittle Tom loves playing games. One day he downloads a little computer game called 'Bloxorz' which makes him excited. It's a game about rolling a box to
1001. Reverse RootTime limit: 2.0 secondMemory limit: 64 MBThe problem is so easy, that the authors were lazy to write a statement for it!InputThe input stream contains a set of integer numbers Ai (0 ≤ Ai ≤ 1018). The numbers are separated by any