After registration opens, and before the end of the Qualification Round, you can register for Google Code Jam at https://code.google.com/codejam. You can tell whether registration is open by checking our schedule.
First, make sure that you're logged in with the same Google Account that registered for Code Jam. If you are, there are a few possible reasons: if this is Round 1B or Round 1C, perhaps you already advanced to Round 2 in an earlier Round 1. Or perhaps you failed to advance to the round currently taking place. If you received an email from Google saying that you're eligible for the round, you're logged in with the right account and you're still unable to compete, please contact us immediately at [email protected] and we will investigate.
For global Google Code Jam rounds, go to https://code.google.com/codejam. There will be a countdown timer that counts down to the start of the round. Check the schedule to be sure.
Our Quick-Start Guide will show you the basics of how to compete. If there's no round running right now, you can use the guide to practice, which will teach you what you'll need to know.
For a detailed description of rounds see Section 3 (Contest Structure) in the Contest Rules for Code Jam 2017.
You can answer the problems in any order you like. Looking at a problem does not start any timers, so you can read all of them at the start and solve them in the order of your choice. There are different point values for each input in each problem, and we generally give lower point values to the questions we think are the easiest.
See Section 4 (Judging and Scoring) in the Google Code Jam Terms & Conditions.
See Section 4.1, B (Programming Language, Code, and Compiler) in the Contest Rules for Code Jam 2017.
You can use any development environment or text editor, including those that cost money. Bear in mind that the programming language you use must have a free compiler or interpreter as further explained in Section 4.1, B (Programming Language, Code, and Compiler) in the Contest Rules for Code Jam 2017.
If you do use an online integrated development environment (IDE), it is your responsibility to make sure nobody else can see your code during the Round. Be aware that for some popular online IDE websites, your code is publicly visible by default; in that case, you must change that setting so that your code for a Round is not publicly visible while that Round is still in progress.
You are free to use whichever operating system you wish for solving the problems. We continually test the website on Linux, Windows and Mac OS to make sure it works on as many operating systems and browsers as possible. The site should work with most modern browsers; if you're having trouble with yours, please let us know.
Yes, you can use your phone if you wish.
Many of our contestants use C++, Java and Python, though occasionally Python's slowness at dealing with large sets of numbers can pose a problem. Our contestants have used a wide variety of languages to compete in Code Jam, though we aren't certain that we'd recommend LOLCODE and Piet.
As long as you have a license to use it, and it was written before the contest, yes. Make sure to submit all code that you used, unless it comes from a standard library that's available online (in which case you should put a comment in your code to that effect). That means you can write your own helper code, or collect your own personal library of code, as long as the license terms of the code permit it. Some Code Jam contestants will have competed on an ACM ICPC team, and many of those teams have their own code books; check with your team's coach whether it's OK for you to use that code in a different context.
See section 7 (Disqualification) in the Google Code Jam Terms & Conditions and Section 7 (Disqualification) of the Contest Rules for Code Jam 2017.
Collaborating with anyone else during any round of the contest, with the exception of the qualification round, is strictly prohibited and will result in your disqualification. This includes discussing or sharing the problem statements or solutions with others during the contest. Participating with multiple accounts is also prohibited. If we believe that you have undermined the integrity of the contest, we reserve the right to disqualify you. Use your best judgment. If you have a question about whether something is allowed, please ask an administrator, either by clicking the "Ask a question" link during a contest or by emailing us at [email protected].
If you suspect another contestant of cheating, please report it.
See section 4.2, B (Time Limit) of the Contest Rules for Code Jam 2017.
Penalty Time = Your penalty time for a round in Code Jam or Distributed Code Jam is equal to the time it took you to submit your last correct solution measured from the start of the round, plus 4 minutes for each incorrect solution you submitted for small inputs you eventually solved.
For example, if you have made the following submissions:
[17m10s] wrong submission for A-Small
[17m35s] wrong submission for A-Small
[18m15s] correct submission for A-Small (10 points)
[29m30s] wrong submission for B-Small
[30m59s] correct submission for C-Small (30 points)
[45m11s] correct submission for A-Large (15 points)
[59m45s] wrong submission for C-Large
...then your score will be 55, with 53m11s of penalty time (45m11s + 2*4m).
Note that we may have Input/Output sets that aren't Small or Large, and we might specify penalty rules for those sets.
See section 4.2, C and D of the Contest Rules for Code Jam 2017.
When you download an input, you will be given the opportunity to upload an output.
Small datasets: You may upload a single output and you will know immediately whether or not it was correct. If you do not upload an output within the 4 minute window, or you upload an output that is judged Incorrect, your attempt for that input will end, and you will incur a 4 minute penalty (see above). However, once that happens, you may download a new Small input, and so on. Once you upload a correct output, you will not be able to download a new input or upload a new output for the rest of the contest.
Large datasets: When you download the input, you will have 8 minutes to upload outputs. Only the last output you upload during this time will be judged, and you will only know the result at the end of the contest. You can never download a new input. You can only upload output attempts during the 8 minute window following you starting the download of the input.
Note that if you use one solution to correctly solve the Small, and then you develop a new solution that you want to use for the Large, you will not be able to download a new Small input to test it. For problems with only one answer per test case, you can use your previously accepted Small output as a standard. However, for problems with multiple acceptable answers per test case, this strategy may not work, since your new solution might produce a different correct result.
The ".in" files are simply text files. You are required to write a program that takes the text from the .in file as input and produces some output (as defined by the problem statement). If you would like to look inside the .in file, you can open it in a text editor. Wordpad and Notepad++ will work, as will any other editor that understands UNIX endlines. Warning: Notepad will generally display .in files incorrectly.
Our Quick-Start Guide has more information on this topic.
See section 4.2, A (Submission Requirements) in the Contest Rules for Code Jam 2017.
You must upload all of your code in addition to any non-standard libraries you used to solve each Input/Output set. If you use a standard library that's available on the Internet, and it's too large to upload, put a comment in your source code explaining where the library is available. If you solve a problem by hand, briefly explain how you solved the problem. Google reserves the right to disqualify any submissions that we believe do not comply with the Terms.
Instead of code, upload a text file briefly explaining that you solved the problem by hand. Google reserves the right to disqualify any submissions that we believe do not comply with the Terms.
See section 4.2, E (Submission Errors and Discrepancies) in the Contest Rules for Code Jam 2017.
You can double-check the submissions you've made by clicking the "View my submissions" link on the left panel of the contest page. This page will let you download the input, output and source code for each of your submissions. For submissions to Large Input/Output sets, only your most recent submission will be available. You can only download your output and source code if you have submitted them.
See Section 4 (Judging and Scoring) in the Google Code Jam Terms & Conditions.
Sometimes a decimal number will appear as part of an input file or a correct output file. This section describes how they work.
Case #1: 500 2.3", the problem may indicate that the second value doesn't have to be the exact string 2.3, but could be any number within 10-6; but it might not indicate that for the 500, in which case that would have to be exact. In that case, "Case #1: 500 2.30000001" would be accepted, but "Case #1: 500.0 2.3" would not.. character, not a , character.5e6 or 1.0e9 (but not like 1,0e9).. character, not a , character.1000, 1000.000 or something similar; but not as 1,000.def IsApproximatelyEqual(x, y, epsilon):
"""Returns True iff y is within relative or absolute 'epsilon' of x.
By default, 'epsilon' is 1e-6.
"""
# Check absolute precision.
if -epsilon <= x - y <= epsilon:
return True
# Is x or y too close to zero?
if -epsilon <= x <= epsilon or -epsilon <= y <= epsilon:
return False
# Check relative precision.
return (-epsilon <= (x - y) / x <= epsilon
or -epsilon <= (x - y) / y <= epsilon)
2,000, 1,5, 6.022e23.1000.0 and an absolute or relative difference of 10-6 is permitted, then the following will be considered correct: 1000.001, 1000, 999.999, 1000., 1e3, 10.00001e2, 9.99999E3 (all are within a relative distance of 10-6). The following will be considered incorrect: 1000.002, 1,000, 1000,0, 999.998.0.001 and an absolute or relative difference of 10-6 is permitted, then 0.001001 and 0.000999 will be considered correct (both are within an absolute difference of 10-6).1000 and there is nothing to indicate that token will be judged specially, then only the exact string 1000 will be considered correct.Sometimes when you submit a malformed or over-sized submission, your submission will be rejected without being judged. You'll be able to resubmit in the time you have left without penalty. Here are some error messages you might receive when that happens, followed by the reason for the message:
A message will appear in yellow above the problem interface telling you whether you solved it correctly or not.
The judgments for the Large inputs will not be available until the end of the round. During the round, we will show your score and rank as though you (and everyone else) had successfully solved every Large set. At the end of the round, the scoreboard and dashboard will reflect the final judgment.
We have recently received reports that a small fraction of contestants received these errors when they tried to submit their output. A 502 error is an indication that your submission didn't get to Google's servers, or arrived at our servers malformed. This can be caused by an incorrectly-configured proxy. All of our reports so far have come from China.
Try submitting from a different browser. If that doesn't work, try competing from https://gcj-prod.appspot.com/codejam. That's just an alias for https://code.google.com/codejam, but using it can solve the problem. If that doesn't work, you'll have to investigate your proxy settings.
We only learned about this error recently, so we're still gathering information about it. We believe that the steps listed above should resolve most 502 issues, but we won't know until we hear from more users who have had the same problem. If you have a 502 error (or we incorrectly tell you that you got a 502), please let us know at [email protected]. Include your geographic location, and let us know what worked and what didn't.
For all questions relating to the onsite finals see Section 5 (Attendance at the Final Round and Related Events) in the Contest Rules for Code Jam 2017. If you become a finalist additional details will be emailed to you prior to the round.
No, unfortunately you cannot.
You can change that by visiting the "Update Profile" link on the front page at https://code.google.com/codejam.
Please note that your flag will be updated for the next contest you compete in but all previous scoreboard pages will remain unchanged.
Please note that you can only change your nickname once a year.
The contest dashboard, which is the page you go to in order to compete, has a number of ways of tracking your status.
At the top of the page, you can find several pieces of information. You can find the time left in the contest, your current rank, your score assuming you solved all Large sets correctly, and a link to the full contest scoreboard.
The "Submissions" panel on the left tells you which problems you've attempted, and your status on each. Problems you haven't attempted yet are shown as "No submissions". Input/Output sets for which you've downloaded the input but not yet uploaded an output are marked "In progress...". If no submission is currently in progress, Small sets may give a number of incorrect attempts, or say "Correct"; Large sets may say "Submitted" or "Time expired".
The "Submissions" panel also lets you see which Small Input/Output sets have been attempted by other users, and how many of them solved each correctly, for an at-a-glance check of what's likely to be the easiest remaining problem.
The "Top Scores" panel of the left shows the scores of the top 10 competitors. Those scores assume that all of their Larges were correct.
The "View my submissions" button on the left lets you see all of your submissions so far. You can see what their status is, and download the input, output and source code files for those submissions.
The contest scoreboard, which appears on a different page, lets you see details of each user's submissions, including time submitted and how many wrong attempts they have on Smalls. There are aggregate statistics about each Input/Output set at the bottom. There's also a Friends tab, for tracking the performance of your friends, and a Closest Competitors tab, which as far as we know is used by nobody... but it's there if you want it!
Visit the contest's home page (e.g. https://code.google.com/codejam) while a round is running, and if you aren't eligible to compete you should see links to "Watch" and to "Read the Problems." If you want to see how a friend or friends are doing, click "Watch", make sure you're logged in with a Google Account, and go to the "Friends" tab. Go to the "Add Friend" area in the top-right and enter your friend's Code Jam nickname, case-sensitive. Then you can watch as your friend climbs the ranks to victory (hopefully).
Before you ever participate in a round, it's a good idea to get used to how the platform works. Even if you have participated before, it can't hurt to try out a few extra problems, and sharpen your skills! Visit our Past Problems page, which is all about how to practice for Code Jam.
Because programming problems often require very precise language, the risk of mistranslating a problem is too great, and the consequences are very severe: a single wrong word can give a very real disadvantage or advantage to contestants reading it. Because of this, we've decided not to make the problems available in more than one language. You may use the mechanical translator of your choice. Talking about the problems with other people, even translators, is not allowed.
We've described the process in our problem preparation guide.
There are a few places to find other Code Jam participants. The primary one is our mailing list and our social channels on Google+, Facebook, Twitter and YouTube. You can also find other Code Jammers on our IRC channel.
You can chat with other competitors using the Channel #gcj on Freenode.
First you need a client. One convenient client is Chatzilla, which is an add-on to Firefox. Many other clients can be used for basic IRC chatting.
Next, you need a connection. First connect to a Freenode server. There are many servers to choose from, but we'll show you how to connect to chat.freenode.net.
/server chat.freenode.net from inside your client./join #gcj — and you are in!/nick 'nickname'. To register your current nickname, just type: /msg nickserv register 'password' 'email'./msg nickserv identify 'password' to identify yourself as the owner of that name./msg nickserv recover 'nickname' 'password'. This locks the nickname so no one else can use it, and boots existing users./msg nickserv release 'nickname' 'password'. You must run this command twice. This unlocks your account so you can use it.Consider asking in the #freenode channel if you need help.
Remember that you are not allowed to discuss problems with other contestants during a round, except for during the Qualification Round. Even then, we ask that you avoid giving away entire answers to the entire IRC channel!