2015年8月16日
摘要: 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-16 19:42 最爱剪刀手 阅读(118) 评论(0) 推荐(0) 编辑
摘要: DescriptionLetxandybe two strings over some finite alphabetA. We would like to transformxintoyallowing only operations given below:Deletion:a letter i... 阅读全文
posted @ 2015-08-16 19:16 最爱剪刀手 阅读(207) 评论(0) 推荐(0) 编辑
摘要: Description一组研究人员正在设计一项实验,以测试猴子的智商。他们将挂香蕉在建筑物的屋顶,同时,提供一些砖块给这些猴子。如果猴子足够聪明,它应当能够通过合理的放置一些砖块建立一个塔,并爬上去吃他们最喜欢的香蕉。研究人员有n种类型的砖块,每种类型的砖块都有无限个。第i块砖块的长宽高分别用xi,... 阅读全文
posted @ 2015-08-16 19:09 最爱剪刀手 阅读(163) 评论(0) 推荐(0) 编辑
  2015年8月15日
摘要: 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-15 14:54 最爱剪刀手 阅读(112) 评论(0) 推荐(0) 编辑
  2015年8月9日
摘要: Given several segments of line (int the X axis) with coordinates [Li, Ri].You are to choose the minimalamount of them, such they would completely cove... 阅读全文
posted @ 2015-08-09 20:41 最爱剪刀手 阅读(177) 评论(0) 推荐(0) 编辑
摘要: My birthday is coming up and traditionally I’mserving pie. Not just one pie, no, I have a numberN of them, of various tastes and of various sizes. Fof... 阅读全文
posted @ 2015-08-09 20:32 最爱剪刀手 阅读(166) 评论(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-09 20:26 最爱剪刀手 阅读(225) 评论(0) 推荐(0) 编辑
  2015年8月7日
摘要: 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-07 20:51 最爱剪刀手 阅读(256) 评论(0) 推荐(0) 编辑
  2015年8月2日
摘要: Description给你一个高为n ,宽为m列的网格,计算出这个网格中有多少个矩形,下图为高为2,宽为4的网格. Input第一行输入一个t, 表示有t组数据,然后每行输入n,m,分别表示网格的高和宽 ( n 2 using namespace std; 3 int main() 4 { 5 ... 阅读全文
posted @ 2015-08-02 19:18 最爱剪刀手 阅读(147) 评论(0) 推荐(0) 编辑
摘要: Description我们知道,在编程中,我们时常需要考虑到时间复杂度,特别是对于循环的部分。例如, 如果代码中出现 for(i=1;i 2 using namespace std; 3 const int maxn=2000+20; 4 int p[maxn][maxn]; 5 void set(... 阅读全文
posted @ 2015-08-02 19:08 最爱剪刀手 阅读(154) 评论(0) 推荐(0) 编辑