ConstraintsTime Limit: 3 secs, Memory Limit: 32 MBDescriptionIn the early 80’s, a popular TV show on Dutch television was ‘Cijfers en Letters’ (Numbers and Letters). This game consisted of two game elements, in which the main goal was to outclass
ConstraintsTime Limit: 10 secs, Memory Limit: 32 MBDescriptionA Bank plans to install a machine for cash withdrawal. The machine is able to deliver appropriate bills for a requested cash amount. The machine uses exactly N distinct bill denominations,
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionLong long ago, city Old was all around the water and was divided into M*N small square houses. The city Old had only two bridges, in the southwest corner and northeast corner. It’s obvious
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAt present, Zhongshan University has 4 campuses with a total area of 6.17 square kilometers sitting respectively on both sides of the Pearl River or facing the South China Sea. The
/*大小寫不區分,沒看到,提交了好幾次我的map,感覺set應該更好ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionWell, how do you feel about mobile phone? Your answer would probably be something like that “It’s so convenient and benefits people a lot”. However, if
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionOn a warm summer afternoon, Hansel and Grethel are walking together in the fields. It is getting late and, to be honest, they are lost. Grethel is a little scared, still vividly
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe island nation of Flatopia is perfectly flat. Unfortunately, Flatopia has no public highways. So the traffic is difficult in Flatopia. The Flatopian government is aware of this problem.
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionAlice and Bob decide to play a funny game. At the beginning of the game they pick n(1 <= n <= 106) coins in a circle, as Figure 1 shows. A move consists in removing one or
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionN couples are standing in a circle, numbered consecutively clockwise from 1 to 2N. Husband and wife do not always stand together. We remove the couples who stand together until the circle
/*直接類比ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionA number of students sit in a circle facing their teacher in the center. Each student initially has an even number of pieces of candy. When the teacher blows a whistle, each student
/*用兩個map來實現ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionOn BBS, there is a familiar term called MJ (short for MaJia), which means another BBS ID of one person besides his/her main ID.These days, a lot of ACMers pour water on the
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionCraig is fond of planes. Making photographs of planes forms a major part of his daily life. Since he tries to stimulate his social life, and since it’s quite a drive from his home to the
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe new general manager Gill Bates has been to a seminar on time management. Ever since she has been bothering all of her staff to manage their own time. Now she plans to take it one step
/*1,大整數加法,用string類比2,用一個數組類比兔子成長過程ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionThe rabbits have powerful reproduction ability. One pair of adult rabbits can give birth to one pair of kid rabbits every month. And after m months, the
/*ConstraintsTime Limit: 1 secs, Memory Limit: 32 MB DescriptionThe columnar encryption scheme scrambles the letters in a message (or plaintext) using a keyword as illustrated in the following example: Suppose BATBOY is the keyword and our message
ConstraintsTime Limit: 1 secs, Memory Limit: 32 MBDescriptionLong long ago, there was a super computer that could deal with VeryLongIntegers(no VeryLongInteger will be negative). Do you know how this computer stores the VeryLongIntegers? This