2012年11月12日
摘要: Problem 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 max sum in this sequence is 6 + (-1) + 5 + 4 = 14.InputThe first line of the input contains an integer T(1<=T<=20) which means the number 阅读全文
posted @ 2012-11-12 22:22 MrMission 阅读(305) 评论(0) 推荐(0) 编辑
摘要: Problem DescriptionQueues and Priority Queues are data structures which are known to most computer scientists. The Queue occurs often in our daily life. There are many people lined up at the lunch time.Now we define that ‘f’ is short for female and ‘m’ is short for male. If the queue’s length is L, 阅读全文
posted @ 2012-11-12 10:32 MrMission 阅读(344) 评论(0) 推荐(0) 编辑