There's a lot of important information in the official
Terms and
FAQ for Google Code Jam; and
if you're competing, you should read them. But if you're on the site to
practice your programming skills, or you just need a quick refresher on how
the competition arena works, here are the steps you should follow:
- Open the competition arena to your round.
If you're competing, go to your contest's home page at the time of the
round. If you're practicing, visit the
Past Problems and select
a round.
- Read the problem. The first few sections will describe precisely what
problem your program needs to solve.
If you're competing and you think a problem is not explained properly,
click on the 'Ask a Question' link on the left and let us know.
Take careful note of the Limits section. This section will describe two
different sets of limits: limits for the Small input and the Large
input. This should give you some idea of how quickly your algorithm will
need to run.
- Write a program that will solve the problem described, with the Small
limits described, in less than ~3 minutes. Make sure your program
accepts input and gives output in the format given; if you run it with
the Sample Input as input, it should produce precisely the Sample Output
(including the "Case #" text).
If you are not sure how to deal with input and output, take a look at our
tutorial for one possibility
you might like.
- At the top of the page, click to solve the small and download the
input. During a real contest, a 4-minute timer will start as soon as we
receive the download request. If you're practicing, there won't be a
timer (but your code should still be able to solve the problem in 4
minutes).
- Run your program on that input, and save the result in a file. Submit
that file as your output, and your source code as your code.
During practice, you can't submit source code.
During a contest your code is not evaluated directly, but is made
publicly available at the end of the contest. If you don't submit the
right source code, you could be heavily penalized after the end of the
contest.
The server will respond in one of a few ways:
- Correct: Your submission was completely correct in every
case!
- Rejected: The response should tell you what was wrong; often it
means you submitted the wrong file. The clock is still ticking, so
see if you can fix the bug before you run out of time.
- Incorrect: Your result was wrong, maybe even in just one test
case. You can fix your program and try again as many times as you
like.
We won't tell you what you did wrong, so you'll have to debug it
on your own. After the contest you can download other users'
correct code and look at what results they get on the same input.
You'll download a new input file every time, so
don't use the old one again by mistake!
There's a small penalty for incorrect attempts.
During practice, there's only one input file.
If you run out of time before making a submission, it will be treated in
the same way as if you submitted and were incorrect.
- After you solve the Small input, the Large input will become
available. Once your program is ready to deal with the higher limits,
download the Large input. An 8-minute timer will start as soon as we
receive the download request.
- Run your program and submit as with the Small. You won't
know whether you solved the problem correctly until the end of the
competition, though your submission could be rejected.
During practice, the server will instead respond in the same way as on
the Small input.
We won't stop the timer after you submit, so if you want to do some
testing and submit again, you can do that. You'll only be judged on
your last submission.
- Move on to another problem (there's a list on the left). Each input
you solve correctly is worth a number of points that's written next to its
download link; the contestant with the most points at the end of the
contest wins. Ties are broken by which contestant got her last point
first, with 4 minutes of penalty time given for each incorrect submission
on a small input that you got right later.