2007 Stanford Local Programming Contest

Saturday, 6 October 2007
Gates B02 (basement computer cluster) and Gates B21 (PUP cluster)
12:00 pm to 5:00 pm


Sponsored by  

News and updates

The webpage for the 2009 Stanford ACM Local Programming Contest is available here.

Congratulations to all participants! The first and second Stanford ACM teams for 2007-08 are

First team Second team Alternate Teams consist of the highest ranking eligible individuals. Congratulations also to Ying Wang, our highest-scoring non-eligible competitor who solved all 8 problems!

Many thanks to Sonny Chan and David Arthur for suggesting several of the problems used in this contest! Thanks to Tomas Rokicki for helping to debug the problem set beforehand, and to Karen Lee for running the judging scripts during the contest. And a big thank you to Palantir Technologies for helping make this event a huge success!

Judge solutions (and some contestant solutions) and test data are now available:

cakes censorship change dice divisibility go jogger pool
Input cakes.in censorship.in change.in dice.in divisibility.in go.in jogger.in pool.in
Output cakes.out censorship.out change.out dice.out divisibility.out go.out jogger.out pool.out
chuongdo cakes.cc censorship.cc change.cc dice.cc divisibility.{cc/java} go.cc jogger.{cc/java} pool.{cc/java}
darthur cakes.cc censorship.cc change.cc dice.cc divisibility.cc go.cc jogger.cc pool.cc
sonny cakes.cc change.cc dice.cc divisibility.cc go.cc jogger.cc pool.cc
rokicki cakes.java dice.java divisibility.java
yw1984 cakes.cc censorship.cc change.cc dice.cc divisibility.cc go.cc jogger.cc pool.cc
tanonev cakes.java change.java dice.java divisibility.java go.java pool.java
mhwu cakes.cc change.cc dice.cc divisibility.cc go.cc jogger.cc

Statistics on the problem set, thanks to David Arthur:
Problem      | #   #AC | %AC   %CE  %PE  %RE   %TL   %WA   | Fastest Avg
-------------+---------+-----------------------------------+----------------
cakes        | 43  6   | 13.95 0.00 0.00 0.00  13.95 72.09 | 12      94.50
censorship   | 14  1   | 7.14  0.00 0.00 0.00  92.86 0.00  | 93      93.00
change       | 9   6   | 66.67 0.00 0.00 22.22 11.11 0.00  | 35      137.67
dice         | 50  10  | 20.00 2.00 0.00 4.00  48.00 26.00 | 15      67.60
divisibility | 37  20  | 54.05 0.00 0.00 10.81 18.92 16.22 | 4       41.10
go           | 15  9   | 60.00 0.00 0.00 0.00  13.33 26.67 | 41      101.11
jogger       | 6   2   | 33.33 0.00 0.00 0.00  0.00  66.67 | 110     134.00
pool         | 11  3   | 27.27 0.00 0.00 0.00  0.00  72.73 | 113     169.00
-------------+---------+-----------------------------------+----------------
TOTAL        | 185 57  | 30.81 0.54 0.00 4.32  28.65 35.68 | 4       81.91
The problem set is available in PDF and PS format.
The final contest scoreboard can be found here.
On the day of this contest, the University of Calgary will simultaneously run an independent mirror of the Stanford Local Contest as a practice contest. Come and help us make a good showing for Stanford!

Instructions for the contest and a practice problem have been posted in PDF and PS format. Please try these out before the contest to make sure that the contest scripts are working properly for you.
If you have a conflict with the official contest date, and would like to take the contest early on Friday, please email me.
This year, Palantir Technologies will be sponsoring free pizza following the contest in Gates 104, so come and hang out with us!
The regional contest will be held on Saturday, November 10, 2007.
For those who earn spots on the Stanford ACM team, we will hold team practices on the weekends leading up to the Regional contest.

What is this all about?

Once again, Stanford will be hosting a local programming contest to select the students who will represent Stanford at the 2007 ACM Pacific NW Regional Contest, and hopefully, at the 2008 ACM International Collegiate Programming Contest in Alberta, Canada!

The local contest will be an individual contest (students compete as individuals, and not on teams). The top six individuals will be grouped to form two teams of three students each to represent Stanford at the regional contest.

The top two teams at the regional contest qualify for the International Contest Finals to be held in mid-April. The winning students not only bring fame and glory to their university, they also win hefty scholarships ($$) and plenty of free software.

The contest pits teams of three individuals working on a single computer against a host of problems (typically 7-10) that must be solved in five hours. These problems can generally be solved by careful analysis and application of algorithms taught in undergraduate computer science. Some are quite challenging. For examples, see the problems from previous years of this contest.

Am I eligible to compete?

To qualify for a spot on the Stanford ACM team:

Note that in the past, a maximum of one graduate student was allowed per team -- this is no longer the case. For more details, go here.

NOTE: Even if you're not eligible to compete for a spot on the Stanford ACM team, as long as you have a Leland account, you may participate in the local contest anyway! Come join the fun!

How do I compete?

STEP ONE: Send an e-mail to indicating that you will be competing so that we can get a rough idea of how many students to expect. Please also mention

  1. whether you are an undergraduate or graduate student,
  2. whether you are eligible for a spot on the Stanford ACM team, and
  3. whether you would prefer to work at Gates or in your own room
STEP TWO: Come to Gates room B02 (the computer cluster in the basement) on Saturday, October 6th at 12:00 pm. We will go over the rules of the contest, set you up with a practice problem, and begin the contest promptly at 1:00 pm. You may also work from your own room by sshing to any of the Leland systems machines (saga, elaine, etc).

STEP THREE: Code like mad!!! The contest will last 4 hours. There are some great practice problems to try in the archives (previous contest pages). Come and help make a good showing for Stanford. We hope to see you there!

Rules and FAQ

Is the local contest an individual or team event?

Students participating in the local contest will compete as INDIVIDUALS. The top scorers will be grouped together to form the best possible teams. There will be two teams of three students each.

Can you bring notes/books to the contest?

Yes. You can bring textbooks, notes, printouts of code, and any other written material you want. However, you may NOT bring any MAGNETIC media (disks). In other words, you will have to MANUALLY TYPE into the computer any code that you use in your solutions (i.e. code that has been entered and/or compiled before the contest begins may NOT be used). You MAY NOT use any electronic devices (ie. calculators, laptops), since you will have a fairly sophisticated "calculator" sitting in front of you. You also MAY NOT browse the web and download code. At the Regional contest, all you'll have is a PC plus any printouts/books/notes that you carry with yourself.

What platforms and languages will be supported?

At last year's regional contest and world finals, the programming environment consisted of Red Hat Linux 9.0 with all standard editors and compilers as well as some optional IDEs. It would be great if we could replicate these conditions here at Stanford for the local contest, but we will have to make do with what we have. The Gates B02 contains mainly PC systems, so contestants must "ssh" to the Sweet Hall machines and compose and compile their code there. Students with CS accounts are encouraged to work from the nearby PUP cluster. It is a good idea to familiarize yourself with these machines BEFORE the contest so that you are comfortable with editing and compiling code in this manner. If you're using a Windows machine, consider using the VNC utility for running remote XWindows sessions. We will support the judging of C, C++, and Java code.

How many problems will there be?

We haven't decided yet. The problems and solutions this year are still being developed. There will most likely be 5-7 problems.

What about scoring?

The judging will proceeds as follows:

How do I prepare for this contest?

Success in the ACM programming contest requires a combination of coding speed and algorithmic ability. To make sure that you're ready for the contest, make sure that you are comfortable with the programming environment for the local contest (see Rules and FAQ above). Contest problems typically involve dynamic programming, search, simulation, geometry, and more.

The best way to prepare for ACM-style programming problems is to practice! The Universidad de Valladolid Problem Set Archive has tons of problems that you can solve and an online judge for grading your solutions automatically. Other problem set archives may be found here and here. Also, check out the problems from previous contests in the section below. Although it uses a different competition format, the online TopCoder weekly matches provide very useful preparation for ACM; one of the most useful features of the website is the ability to look at other contestant's solutions to problems from previous contests.

Previous contests

2006 Stanford Local Programming Contest
2005 Stanford Local Programming Contest
2004 Stanford Local Programming Contest
2003 Stanford Local Programming Contest
2002 Stanford Local Programming Contest
2001 Stanford Local Programming Contest
2000 Stanford Local Programming Contest
1999 Stanford Local Programming Contest
1998 Stanford Local Programming Contest
1997 Stanford Local Programming Contest
1996 Stanford Local Programming Contest

1998-2003 Pacific Northwest Regional Contests

2003-2004 ACM ICPC Regional Contests
2002-2003 ACM ICPC Regional Contests
2001-2002 ACM ICPC Regional Contests

2007 ACM ICPC World Finals


Problem writers: Chuong Do, Sonny Chan, David Arthur
Problem testers: Chuong Do, Sonny Chan, David Arthur, Tomas Rokicki
Local contest organizers: Chuong Do, Sonny Chan
E-mail: