


























Google™ Code Jam 中国编程挑战赛第一轮2005年12月19日21时在线举行,3道难度不同的题目,分数各为250、500和1000,难度高的题目分数较高,编码时间75分钟。
Round 1 Problem 250 Statement
You want to buy two neighboring tickets
in the first row of the theater so that one of the tickets is as far from the aisles as possible.Class:
TheaterVisit
Method:
chooseSeat
Parameters:
Constraints
-Examples
0)"....."This problem statement
is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.Round 1 Problem 500 Statement
A group of vertical blocks are placed densely one after another on the ground. The blocks each have a width of
1, but their heights may vary. For example, if the heights of the vertical blocks are given as {1,5,5,1,6,1}, the configuration would look like the following picture:Definition
Class:
BlockStructure
Method:
cover
Parameters:
Constraints
-Examples
0){
1,5,5,1,6,1}{
2,2,2,4,4}{
6,6,6,6,6,6}{
71,44,95,16,10,80,12,17,98,61}{
100,100,97,100,100,100,97,98,99,99}This problem statement
is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.Round 1 Problem 1000 Statement
We have a sequence of integers, and we would like to remove all duplicate elements from
this sequence. There may be multiple ways to perform this task. For example, given the sequence { 1, 2, 1, 3 }, we could end up with either { 1, 2, 3 } or { 2, 1, 3 } as the remaining sequence, depending on which duplicate 1 we remove from the original sequence. For this problem, we want to return the lexicographically first of of all possible remaining sequences. A sequence S1 comes before sequence S2 lexicographically if and only if S1 has a smaller value than S2 at the lowest index at which the two sequences differ (so, for example, { 1, 2, 3 } comes before { 2, 3, 1 }).Definition
Class:
HardDuplicateRemover
Method:
process
Parameters:
Constraints
-Examples
0){
5, 6, 5, 1, 6, 5}The last variant
is the lexicographically first.1){
3, 2, 4, 2, 4, 4}{
6, 6, 6, 6, 6, 6}{
1, 3, 2, 4, 2, 3}{
5, 4, 1, 5}This problem statement
is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2003, TopCoder, Inc. All rights reserved.此内容由惯性聚合(RSS阅读器)自动聚合整理,仅供阅读参考。 原文来自 — 版权归原作者所有。