TopCoder比赛简介

来源:互联网 发布:linux内核移植教程 编辑:程序博客网 时间:2024/05/01 17:00
 TopCoder比赛简介
2001年成立的TopCoder实际上已经是非常出名了,它的客户包括Google、MS、YAHOO、Intel、 Motorola和SUN等世界上顶级的IT公司,到TopCoder上不仅能给你带来现金的奖励,它还有可能帮助你进入世界顶级的IT企业。要知道 Google为了等待Jon McAlister (jonmac)足足用了两年多的时间,其间还有MS和GlodMan的挖角,最终Jon McAlister选择了Google。可笑的是中国的IT媒体在翻译时竟然称Google让Jon McAlister等了一段时间,整个把事情搞反了,这也难怪毕竟这些搞媒体的不了解TopCoder的意义。现在jonmac的等级分是2354,排名50,而WishingBone(中国)的等级分是2533,排名29,我们大家是不是该为现在的年轻一代感到骄傲呢!知道了这些朋友们是不是想参加TopCoder的比赛呢?下面介绍一下参加步骤:
必要准备
要参加比赛,需要一些准备工作要做。
首先,需要注册成为TopCoder成员,这没什么好介绍的,大家填写相关内容就得了,注册网址Registration
其次,下载安装必要的软件-TopCoder Arena(竞技场,古罗马的斗兽场也是这个词),TopCoder Arena是一个纯Java应用程序,它既是Applet也是应用程序,所以需要安装Java运行环境。相关软件的网址ContestAppletProd.jnlp(Java Web Start 方式安装)
再次,启动TopCoder Arena>登录进入,就可以开始参加比赛了。
比赛概况
每年TopCoder都会有几个编程竞赛和锦标赛,参赛者被分成很多小组,进行一个或多个回合有时间限制的比赛。在每个回合,参赛者必须编写代码来解决三个不同难度的问题。你可以在TopCoder Arena里进行编辑,编译和测试。一个典型的问题包含一个必要的方法说明,几段用于描述问题的文字和一个说明性的实例子。在TopCoder Arena里,你可以看到过去真实的问题。下面是一个中等难度的问题:

-----------------------------------------------------------------------
Problem Statement
   
We want to display a two-color pattern on a rectangular array of pixels, with k of the pixels in the foreground color. We want to choose the pattern so that it minimizes the boundary between the foreground and the background.
The length of the boundary is the number of vertical and horizontal pixel edges that separate a foreground pixel from a background pixel. For example, this picture shows a rectangular array with three rows and six columns that has 5 foreground pixels (indicated by 'X'). The boundary in this case has length equal to 6: the upper left X is adjacent to 1 background pixel, the upper middle X is adjacent to 1, the rightmost X is adjacent to 3, the lower left X is adjacent to 0, and the lower right X is adjacent to 1.
   - - - - - -
   X X X - - -
   X X - - - -
Create a class Coherence that contains the method minBndry that takes three int inputs, numRows (the height of the array), numCols (the width of the array), and k (the number of foreground pixels), and returns the length of the minimum possible boundary.
Definition
   
Class:
Coherence
Method:
minBndry
Parameters:
int, int, int
Returns:
int
Method signature:
int minBndry(int numRows, int numCols, int k)
(be sure your method is public)
   

Constraints
-
numRows is between 1 and 30 inclusive
-
numCols is between 1 and 30 inclusive
-
k is between 0 and numRows*numCols inclusive
Examples
0)

   
6
6
5
Returns: 5
  X X X - - -
  X X - - - -
  - - - - - -
  - - - - - -
  - - - - - -
  - - - - - -
The upper right foreground pixel has 2 boundary edges, the bottom right one has 2 boundary edges, and the bottom left one has 1 boundary edge.
1)

   
4
6
16
Returns: 4
 X X X X - -
 X X X X - -
 X X X X - -
 X X X X - -
2)

   
9
5
0
Returns: 0
---------------------------------------------------------------------

评分是根据你完成的时间和所完成问题的难易决定的。发送代码后,你就进入挑战阶段了,在这个时候别人可以检查你的代码来发现它们是否有Bug。如果有,发现这个Bug的参赛者会因为查出你代码中的Bug而得分,相应的,你就要被扣分。挑战结束后,TopCoder会测试每个参赛者的代码,如果你的代码产生了不正确的输出、异常终止和其它错误,你就不能得分。如果是多个回合比赛,每个小组中得分最高的三位参赛者将进入下一轮的比赛。他们将解决一些新的问题,最后总得分在前三名的选手将会得到现金奖励。加入TopCoder是免费的,不用支付任何费用。TopCoder通过赞助商来获取相应的比赛经费,选拔出来的天才编程人员将有机会进入赞助商的企业。实际上,TopCoder这种选人方式已经越来越被世界级的IT企业所重视,相信不久的将来会成为IT企业招募人才的重要手段,所以中国的程序员需要重视这一动向,早做安排。即便TopCoder不能给朋友们带来工作机会,但它将顶级的人才聚集到一块,采用一种有趣的方式帮助你提高编程技巧,使我们在一种竞争的氛围里共同进步,不也是很好吗?找高手上TopCoder准没错。更详细的内容见TopCoder官方网站。
 
原创粉丝点击