摘要: 题目连接:Game Of RotationMark is an undergraduate student and he is interested in rotation. A conveyor belt competition is going on in the town which Mark... 阅读全文
posted @ 2014-08-02 22:24 SunshineAtNoon 阅读(421) 评论(0) 推荐(0) 编辑
摘要: 有n组好朋友在公交车站前排队。第i组有ai个人。还有一辆公交车在路线上行驶。公交车的容量大小为x,即它可以同时运载x个人。 当车站来车时(车总是空载过来),一些组从会队头开始走向公交车。 当然,同一组的朋友不想分开,所以仅当公交车能容纳下整个组的时候,他们才会上车。另外,每个人不想失去自己的位置,即... 阅读全文
posted @ 2014-08-02 21:32 SunshineAtNoon 阅读(508) 评论(0) 推荐(0) 编辑
摘要: 给你一个n*n的地图。地图中的每个格子有一个值表示该地区的深度。我们称一个地图中的一个格子为空洞,当且仅当该格子不在地图边缘并且每个和它相邻的格子都具有比它更小的深度。两个格子称为相邻如果它们共有一条边。你要找到地图中所有的空洞,并且用X描述。输入格式第一行包含一个整数n,表示地图的规模。 接下来n... 阅读全文
posted @ 2014-08-02 13:11 SunshineAtNoon 阅读(333) 评论(0) 推荐(0) 编辑
摘要: Watson gives an array A1,A2...AN to Sherlock. Then he asks him to find if there exists an element in the array, such that, the sum of elements on its ... 阅读全文
posted @ 2014-08-02 11:10 SunshineAtNoon 阅读(435) 评论(0) 推荐(0) 编辑
摘要: QuickSortIn the previous challenge, you wrote a partition method to split an array into 2 sub-arrays, one containing smaller elements and one containi... 阅读全文
posted @ 2014-08-02 09:49 SunshineAtNoon 阅读(1065) 评论(0) 推荐(0) 编辑