上一页 1 ··· 11 12 13 14 15
摘要: A Simple Problem with IntegersDescriptionYou have N integers, A1, A2, ... , AN. You need to deal with two kinds of operations. One type of operation is to add some given number to each number in a given interval. The other is to ask for the sum of numbers in a given interval.InputThe first line con. 阅读全文
posted @ 2013-04-09 21:47 _log__ 阅读(159) 评论(0) 推荐(0) 编辑
摘要: Genealogical treeDescriptionThe system of Martians' blood relations is confusing enough. Actually, Martians bud when they want and where they want. They gather together in different groups, so that a Martian can have one parent as well as ten. Nobody will be surprised by a hundred of children. M 阅读全文
posted @ 2013-04-08 11:44 _log__ 阅读(297) 评论(0) 推荐(0) 编辑
摘要: The SuspectsDescriptionSevere acute respiratory syndrome (SARS), an atypical pneumonia of unknown aetiology, was recognized as a global threat in mid-March 2003. To minimize transmission to others, the best strategy is to separate the suspects from others. In the Not-Spreading-Your-Sickness Univers. 阅读全文
posted @ 2013-04-03 09:36 _log__ 阅读(153) 评论(0) 推荐(0) 编辑
摘要: Til the Cows Come HomeDescriptionBessie is out in the field and wants to get back to the barn to get as much sleep as possible before Farmer John wakes her for the morning milking. Bessie needs her beauty sleep, so she wants to get back as quickly as possible. Farmer John's field has N (2 <= 阅读全文
posted @ 2013-04-01 22:10 _log__ 阅读(199) 评论(0) 推荐(0) 编辑
摘要: 滑雪DescriptionMichael喜欢滑雪百这并不奇怪, 因为滑雪的确很刺激。可是为了获得速度,滑的区域必须向下倾斜,而且当你滑到坡底,你不得不再次走上坡或者等待升降机来载你。Michael想知道载一个区域中最长底滑坡。区域由一个二维数组给出。数组的每个数字代表点的高度。下面是一个例子 1 2 3 4 5 16 17 18 19 6 15 24 25 20 7 14 23 22 21 8 13 12 11 10 9一个人可以从某个点滑向上下左右相邻四个点之一,当且仅当高度减小。在上面的例子中,一条可滑行的滑坡为24-17-16-1。当然25-24-23-...-3-2-1更长。... 阅读全文
posted @ 2013-03-30 11:22 _log__ 阅读(262) 评论(0) 推荐(0) 编辑
摘要: MatrixProblem DescriptionGive you a matrix(only contains 0 or 1),every time you can select a row or a column and delete all the '1' in this row or this column .Your task is to give out the minimum times of deleting all the '1' in the matrix. InputThere are several test cases.The firs 阅读全文
posted @ 2013-03-28 17:36 _log__ 阅读(138) 评论(0) 推荐(0) 编辑
上一页 1 ··· 11 12 13 14 15