摘要: DescriptionThe world financial crisis is quite a subject. Some people are more relaxed while others are quite anxious. John is one of them. He is very... 阅读全文
posted @ 2015-08-11 21:55 简约。 阅读(114) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a sequence a[1],a[2],a[3]......a[n], your job is to calculate the max sum of a sub-sequence. For example, given (6,-1,5,4,-7), the ma... 阅读全文
posted @ 2015-08-11 15:37 简约。 阅读(233) 评论(0) 推荐(0) 编辑
摘要: Descriptionbobo has a sequence a1,a2,…,an. He is allowed to swap twoadjacentnumbers for no more than k times.Find the minimum number of inversions aft... 阅读全文
posted @ 2015-08-09 21:40 简约。 阅读(172) 评论(0) 推荐(0) 编辑
摘要: DescriptionBefore the invention of book-printing, it was very hard to make a copy of a book. All the contents had to be re-written by hand by so calle... 阅读全文
posted @ 2015-08-08 16:04 简约。 阅读(101) 评论(0) 推荐(0) 编辑
摘要: DescriptionOnce Bob took a paper stripe ofnsquares (the height of the stripe is 1 square). In each square he wrote an integer number, possibly negativ... 阅读全文
posted @ 2015-08-08 15:32 简约。 阅读(122) 评论(0) 推荐(0) 编辑
摘要: DescriptionVanya walks late at night along a straight street of lengthl, lit bynlanterns. Consider the coordinate system with the beginning of the str... 阅读全文
posted @ 2015-08-08 15:20 简约。 阅读(235) 评论(0) 推荐(0) 编辑
摘要: Given several segments of line (int the X axis) with coordinates [Li , Ri ]. You are to choose the minimal amount of them, such they would completely ... 阅读全文
posted @ 2015-08-06 21:12 简约。 阅读(107) 评论(0) 推荐(0) 编辑
摘要: My birthday is coming up and traditionally I’m serving pie. Not just one pie, no, I have a number N of them, of various tastes and of various sizes. ... 阅读全文
posted @ 2015-08-06 10:00 简约。 阅读(126) 评论(0) 推荐(0) 编辑
摘要: DescriptionIn this problem, you have to analyze a particular sorting algorithm. The algorithm processes a sequence of n distinct integers by swapping ... 阅读全文
posted @ 2015-08-04 15:48 简约。 阅读(154) 评论(0) 推荐(0) 编辑
摘要: DescriptionToday on a lecture about strings Gerald learned a new definition of string equivalency. Two stringsaandbof equal length are calledequivalen... 阅读全文
posted @ 2015-07-31 21:32 简约。 阅读(200) 评论(0) 推荐(0) 编辑