摘要: 【问题描述】 有n个人坐成一排,这n个人都在某一个小组中,同一个小组的所有人所坐的位置一定是连续的。 有一个记者在现场进行采访,他每次采访都会询问一个人其所在的小组有多少人,被询问的每个人都给出了正确的答案,但是由于时间仓促,记者不一定询问了每个人,我们记录一个长度为n的答案序列,序列的第i个数表示 阅读全文
posted @ 2017-09-14 23:19 傅judge 阅读(251) 评论(0) 推荐(1) 编辑
摘要: Description We give the following inductive definition of a “regular brackets” sequence: the empty sequence is a regular brackets sequence, if s is a 阅读全文
posted @ 2017-09-14 21:26 傅judge 阅读(146) 评论(0) 推荐(1) 编辑
摘要: Description The cows are trying to become better athletes, so Bessie is running on a track for exactly N (1 ≤ N ≤ 10,000) minutes. During each minute, 阅读全文
posted @ 2017-09-14 21:23 傅judge 阅读(175) 评论(0) 推荐(0) 编辑
摘要: Description Before ACM can do anything, a budget must be prepared and the necessary financial support obtained. The main income for this action comes 阅读全文
posted @ 2017-09-14 21:20 傅judge 阅读(180) 评论(0) 推荐(0) 编辑
摘要: Description Let us define a regular brackets sequence in the following way: 1. Empty sequence is a regular sequence. 2. If S is a regular sequence, th 阅读全文
posted @ 2017-09-14 21:18 傅judge 阅读(192) 评论(0) 推荐(0) 编辑
摘要: Description In the army, a platoon is composed by n soldiers. During the morning inspection, the soldiers are aligned in a straight line in front of t 阅读全文
posted @ 2017-09-14 21:16 傅judge 阅读(177) 评论(0) 推荐(0) 编辑
摘要: Description Given a set of n integers: A={a1, a2,..., an}, we define a function d(A) as below: Your task is to calculate d(A). Input The input consist 阅读全文
posted @ 2017-09-14 21:13 傅judge 阅读(123) 评论(0) 推荐(0) 编辑