摘要: You are going from Dhaka to Chittagong by train and you came to know one of your old friends is goingfrom city Chittagong to Sylhet. You also know tha... 阅读全文
posted @ 2015-08-18 11:03 果冻0_0 阅读(230) 评论(0) 推荐(0) 编辑
摘要: Description 小明对数的研究比较热爱,一谈到数,脑子里就涌现出好多数的问题,今天,小明想考考你对素数的认识。 问题是这样的:一个十进制数,如果是素数,而且它的各位数字和也是素数,则称之为“美素数”,如29,本身是素数,而且2+9 = 11也是素数,所以它是美素数。 给定一个区间,... 阅读全文
posted @ 2015-08-17 20:54 果冻0_0 阅读(359) 评论(0) 推荐(1) 编辑
摘要: DescriptionA subsequence of a given sequence is the given sequence with some elements (possible none) left out. Given a sequence X = another sequence... 阅读全文
posted @ 2015-08-16 21:00 果冻0_0 阅读(144) 评论(0) 推荐(0) 编辑
摘要: DescriptionThe aspiring Roy the Robber has seen a lot of American movies, and knows that the bad guys usually gets caught in the end, often because th... 阅读全文
posted @ 2015-08-16 19:21 果冻0_0 阅读(112) 评论(0) 推荐(0) 编辑
摘要: DescriptionMany years ago , in Teddy’s hometown there was a man who was called “Bone Collector”. This man like to collect varies of bones , such as do... 阅读全文
posted @ 2015-08-14 21:34 果冻0_0 阅读(626) 评论(0) 推荐(0) 编辑
摘要: DescriptionGiven a two-dimensional array of positive and negative integers, a sub-rectangle is any contiguous sub-array of size 1*1 or greater located... 阅读全文
posted @ 2015-08-13 17:02 果冻0_0 阅读(280) 评论(0) 推荐(0) 编辑
摘要: 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-12 19:15 果冻0_0 阅读(257) 评论(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 09:04 果冻0_0 阅读(151) 评论(0) 推荐(0) 编辑
摘要: DescriptionHere is a famous story in Chinese history."That was about 2300 years ago. General Tian Ji was a high official in the country Qi. He likes t... 阅读全文
posted @ 2015-08-11 08:51 果冻0_0 阅读(261) 评论(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-09 19:45 果冻0_0 阅读(243) 评论(0) 推荐(0) 编辑