摘要: 原题:DescriptionDue to recent rains, water has pooled in various places in Farmer John's field, which is represented by a rectangle of N x M (1 2 #incl... 阅读全文
posted @ 2015-07-26 18:44 Shawn_Ji 阅读(141) 评论(0) 推荐(0) 编辑
摘要: 原题:DescriptionA robot has to patrol around a rectangular area which is in a form ofmxngrid (mrows andncolumns). The rows are labeled from 1 tom. The c... 阅读全文
posted @ 2015-07-26 18:43 Shawn_Ji 阅读(242) 评论(0) 推荐(0) 编辑
摘要: 原题:DescriptionA friend of you is doing research on theTraveling Knight Problem (TKP)where you are to find the shortest closed tour of knight moves tha... 阅读全文
posted @ 2015-07-26 18:41 Shawn_Ji 阅读(165) 评论(0) 推荐(0) 编辑
摘要: 原题:DescriptionLittle Valentine liked playing with binary trees very much. Her favorite game was constructing randomly looking binary trees with capita... 阅读全文
posted @ 2015-07-26 18:40 Shawn_Ji 阅读(196) 评论(0) 推荐(0) 编辑
摘要: 原题:Description某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后从头开始轮流进行一至二... 阅读全文
posted @ 2015-07-26 18:39 Shawn_Ji 阅读(258) 评论(0) 推荐(0) 编辑
摘要: 原题:DescriptionTwo bored soldiers are playing card war. Their card deck consists of exactlyncards, numbered from1ton,all values are different. They div... 阅读全文
posted @ 2015-07-26 18:37 Shawn_Ji 阅读(241) 评论(0) 推荐(0) 编辑
摘要: 原题DescriptionYou are given a string consisting of parentheses()and[]. A string of this type is said to becorrect:(a)if it is the empty string(b)if A a... 阅读全文
posted @ 2015-07-26 18:35 Shawn_Ji 阅读(148) 评论(0) 推荐(0) 编辑