摘要: Description Lily 特别喜欢养花,但是由于她的花特别多,所以照料这些花就变得不太容易。她把她的花依次排成一行,每盆花都有一个美观值。如果Lily把某盆花照料的好的话,这盆花的美观值就会上升,如果照料的不好的话,这盆花的美观值就会下降。有时,Lily想知道某段连续的花的美观值之和是多少, 阅读全文
posted @ 2016-07-23 08:53 Geek.w 阅读(183) 评论(0) 推荐(0) 编辑
摘要: Description A tree is a well-known data structure that is either empty (null, void, nothing) or is a set of one or more nodes connected by directed ed 阅读全文
posted @ 2016-07-22 21:16 Geek.w 阅读(128) 评论(0) 推荐(0) 编辑
摘要: Description 定义一个二维数组: int maze[5][5] = { 0, 1, 0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 1, 1, 0, 0, 0, 0, 1, 0, }; 它表示一个迷宫,其中的1表示墙壁,0表示可以走的路,只能横着走 阅读全文
posted @ 2016-07-16 17:06 Geek.w 阅读(214) 评论(0) 推荐(0) 编辑
摘要: Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意2个皇后不允许处在同一排,同一列,也不允许处在与棋盘边框成45角的斜线上。 你的任务是,对于给定的N,求出有多少种合法的放置方法。 Description 在N*N的方格棋盘放置了N个皇后,使得它们不相互攻击(即任意 阅读全文
posted @ 2016-07-16 17:01 Geek.w 阅读(194) 评论(0) 推荐(0) 编辑
摘要: Description The GeoSurvComp geologic survey company is responsible for detecting underground oil deposits. GeoSurvComp works with one large rectangula 阅读全文
posted @ 2016-07-16 16:51 Geek.w 阅读(198) 评论(0) 推荐(0) 编辑
摘要: Description 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Description 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 读入一个只包含 +, -, *, / 的非负整数计算表达式,计算该表达式的值。 Input 阅读全文
posted @ 2016-07-16 16:43 Geek.w 阅读(550) 评论(0) 推荐(0) 编辑
摘要: There is a famous railway station in PopPush City. Country there is incredibly hilly. The station was built in last century. Unfortunately, funds were 阅读全文
posted @ 2016-07-16 16:36 Geek.w 阅读(153) 评论(0) 推荐(0) 编辑
摘要: B - Catch That Cow Description Farmer John has been informed of the location of a fugitive cow and wants to catch her immediately. He starts at a poin 阅读全文
posted @ 2016-07-16 16:02 Geek.w 阅读(169) 评论(0) 推荐(0) 编辑
摘要: F Find a way Pass a year learning in Hangzhou, yifenfei arrival hometown Ningbo at finally. Leave Ningbo one year, yifenfei have many people to meet. 阅读全文
posted @ 2016-07-16 15:38 Geek.w 阅读(213) 评论(1) 推荐(0) 编辑
摘要: A - 士兵队列训练问题 Description 某部队进行新兵队列训练,将新兵从一开始按顺序依次编号,并排成一行横队,训练的规则如下:从头开始一至二报数,凡报到二的出列,剩下的向小序号方向靠拢,再从头开始进行一至三报数,凡报到三的出列,剩下的向小序号方向靠拢,继续从头开始进行一至二报数。。。,以后 阅读全文
posted @ 2016-07-16 15:12 Geek.w 阅读(2659) 评论(0) 推荐(0) 编辑