這題又做了大半天。。題目如下DescriptionOnce again, James Bond is on his way to saving the world. Bond's latest mission requires him to travel between several pairs of cities in a certain country. The country has N cities (numbered by 1, 2, . . ., N), connected by
好長時間沒寫部落格了,一想起“水可三日不飲,飯可七日不食,而程不可一日不編”,還是回顧一下最近的內容,下午打了場多校說下這道A下的第一題。Problem DescriptionThe I-number of x is defined to be an integer y, which satisfied the the conditions below:1. y>x;2. the sum of each digit of y(under base 10) is the
題目是這樣的Problem DescriptionClaire and her little friend, ykwd, are travelling in Shevchenko's Park! The park is beautiful - but large, indeed. N feature spots in the park are connected by exactly (N-1) undirected paths, and Claire is too tired to
Tree RecoveryTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 4585 Accepted: 3061DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capital letters in
題目大意:給定一個由SNWE幾個字母組成的地圖,這四個字母代表著四個方向,給定起點,讓你判斷是否能走出這個地圖,或走到某步的時候形成一個環。。。Sample Input3 6 5NEESWEWWWESSSNWWWW4 5 1SESWEEESNWNWEENEWSEN0 0 0Sample Output10 step(s) to exit3 step(s) before a loop of 8
DescriptionGiven a positive integer n, write a program to find out a nonzero multiple m of n whose decimal representation contains only the digits 0 and 1. You may assume that n is not greater than 200 and there is a corresponding m containing no
StuPIdTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 5111 Accepted: 2631DescriptionBackground At DUT, the Dreamland University of Technology, all students have personal id, numbers with six or seven digits. But they're not just any
An Easy ProblemTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 5783 Accepted: 3344DescriptionAs we known, data stored in the computers is in binary form. The problem we discuss now is about the positive integers and its binary form. Given
Power StringsTime Limit: 3000MS Memory Limit: 65536KTotal Submissions: 13765 Accepted: 5738DescriptionGiven 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
Autumn is a GeniusTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 6040 Accepted: 1269DescriptionJiajia and Wind have a very cute daughter called Autumn. She is so clever that she can do integer additions when she was just 2 years old!
Calling Extraterrestrial Intelligence AgainTime Limit: 1000MS Memory Limit: 65536KTotal Submissions: 8938 Accepted: 3585DescriptionA message from humans to extraterrestrial intelligence was sent through the Arecibo radio telescope in Puerto Rico on
Agri-NetTime Limit: 1000MS Memory Limit: 10000KTotal Submissions: 15626 Accepted: 6327DescriptionFarmer John has been elected mayor of his town! One of his campaign promises was to bring internet connectivity to all farms in the area. He needs your