Sign in
 
 

Frequently Asked Questions for Distributed Code Jam

Can I still compete in Code Jam?

Yes, in order to participate in Distributed Code Jam you must participate in Code Jam and advance to Code Jam Round 2. You can participate and win in both tracks. The rounds will not overlap.

What languages are supported?

In 2017, we will support C++ and Java. Stay tuned for more information.

What does a sample problem look like?

The longest sub sandwich

Your friends made a brave attempt to beat the world record for making the longest sub sandwich ever. They failed or succeeded (it doesn't really matter), and proposed to you to eat as much of the sandwich as you want to.

The sandwich is composed of N parts. Each part has a taste value for you, which might be positive (meaning you want to eat it) or negative (meaning you would prefer not to). Ideally, you would just eat the tasty parts, but it's rude to break out the middle of the sandwich. So, instead you want to eat some part from the beginning, and some part from the end; and to make the total taste of what you eat as large as possible (Note: it's OK to eat the whole sandwich, or to eat nothing at all). Return the largest total taste of what you can eat.

Implementation

Your solution will run on 100 machines. Each machine will get 256MB of RAM and 2 seconds of running time. Your program can use the library methods GetN(), which will return the value of N, and GetTaste(i), which will return the taste value of the i-th piece of the sandwich (for 0 ≤ i < N).

Limits

1 ≤ N < 1010
-108 < GetTaste(i) < 108 for each valid i

Why did you develop Distributed Code Jam?

We want to ensure we're challenging competitors and providing an opportunity for programmers of all types to participate in Code Jam. We also saw this as an opportunity as there are currently no similar competitions in today's competitive coding landscape. Finally, we believe that distributed programming skills are an important part of a modern programmer's skillset and want to provide a platform for programmers to improve and refine those skills.

How do you actually judge my solution?

We have a cluster of virtual machines set up on Google Compute Engine on standby, waiting for your solutions. When you submit, the appropriate number of them get allocated as your nodes. We compile your solution and copy it onto the nodes, and once all the nodes are ready, we launch your nodes simultaneously (as much as it is possible to do anything simultaneously in a distributed environment).

How do I participate?

The guide for the Distributed Code Jam should answer your questions. See the resources below if there is something you need help with.

How do I test my solution?

There are a few tools you can use:

  • For testing correctness, and debug your solution, use the Local Testing Tool, described in the last section of the guide. This will allow you to run your solution locally, on inputs of your choice, by using separate processes to simulate separate nodes. Note that if your program is memory-hungry, running many nodes through the tool might freeze your computer, so the tool might be unsuitable for large-scale testing. Also, the running times you get locally are not necessarily indicative of what will happen on our platform; in particular, message passing times are obviously very different.
  • For gauging your performance, we provide a special "Test Run" problem. This will be a special problem, worth zero points, with only a small input, which will run on a hundred nodes. The point here is to allow you to take code you wrote, change it (to use fake inputs) and submit to see what the running time on our platform will be.
  • Before you submit your large solution, we recommend you first submit the same solution to the small input of the same problem, to make sure you are using the correct input library and reading the input correctly.

How can I practice before the 2017 contest?

Stay tuned for more practice information in 2017.

Where should I look if my question is not listed?

If you did not find your question in the list above, please consult the general FAQ from Google Code Jam. For any other queries you can join our Google Group discussion forum or contact us by email.