Description 跳房子,也叫跳飞机,是一种世界性的儿童游戏,也是中国民间传统的体育游戏之一.跳房子的游戏规则如下: 在地面上确定一个起点,然后在起点右侧画 n 个格子,这些格子都在同一条直线上.每个格子内有一个数字(整数),表示到达这个格子能得到的分数.玩家第一次从起点开始向右跳,跳到起点右侧的一个格子内.第二次再从当前位置继续向右跳,依此类推.规则规定:玩家每次都必须跳到当前位置右侧的一个格子内.玩家可以在任意时刻结束游戏,获得的分数为曾经到达过的格子中的数字之和. 现在小 R 研…
Longest Ordered Subsequence Time Limit: 2000MS Memory Limit: 65536K Total Submissions: 41944 Accepted: 18453 Description A numeric sequence of ai is ordered if a1 < a2 < ... < aN. Let the subsequence of the given numeric sequence (a1, a2, ...…
MAX Average Problem Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others) Total Submission(s): 5825 Accepted Submission(s): 1446 Problem Description Consider a simple sequence which only contains positive integers as…
Constructing Roads In JGShining's Kingdom Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)Total Submission(s): 13646 Accepted Submission(s): 3879 Problem Description JGShining's kingdom consists of 2n(n is no mor…
题目描述 Farmer John is at the market to purchase supplies for his farm. He has in his pocket K coins (1 <= K <= 16), each with value in the range 1..100,000,000. FJ would like to make a sequence of N purchases (1 <= N <= 100,000), where the ith p…