How to: Participate in Google Code Jam

What is Code Jam ?

google code jam logo1 How to: Participate in Google Code Jam

Google Code Jam is a yearly coding competition which is organised and administered by google. It is a coding competition for all professional and student coders, where they are asked to solve complex algorithmioc challenges within a provided time limit.

The winner for the 2009 competition was ACRUSH from China.

Official Dates for Code Jam 2010 competition will be announced in January.

This is for the newbies having very less knowledge about it and want to participate in next competition. With this, you will get to know the necessary things to participate and how to start coding in the beginning.

For participation you need to have a google account and then you can register for the contest from code jam website.

For understanding the contest and  its environment you should visit  this contest link and sign in with your google account and in right side you will see a column like below :

codejam practice previous rounds How to: Participate in Google Code Jam



You can practice with any competition listed above. But make sure you go through these Rules  -

After you enter the competition area you will get a dashboard in which you will see the problems in your left corner.

Your problem will include two input files. One with small set of inputs in it and another with large set of inputs. After reading your problem statements  you can start coding on your system. When you finish with your coding then you can download one of these input files and upload your output file generated by your program. This output file much match the sample output given in the problem statement. After downloading the small input file you will be given four minutes to submit your output file along with your source code otherwise attempt will be marked as incorrect, time limitation for large input file will be eight minutes. Marks for submitting output file for large input is higher than the small input file.

In your left sidebar  you will see submissions of all the coders and top scores.

Hope it gives you a brief overview of the contest.

Now we are going to give you some tips about how to take input and generate output using your program. I am using the language C for  this purpose, further you can implement same in other languages. I learned doing this from top scorers, thanks to all of them.

Easy way of taking inputs from input file and generating output file as well.-

 char file[40];
 char inputfile[40], outputfile[40];  // for the name of input   and output file

 scanf("%s", file);         // give desired name

 strcpy(inputfile, file);   // naming input file
 strcpy(outputfile, file);  // naming output file

 strcat(inputfile, ".in");  // adding extension for difference in input & output file
 strcat(outputfile, ".out");// adding extension for difference in input & output file

 FILE *fp =fopen(inputfile, "r");  //opening input file for read
 FILE *ofp=fopen(outpufile, "w");  //opening output file for write

This code sample can be used in your code for easy creation of files.

Hope you like it !   Any  comment will be appreciated.

Keep practicing and Stay Tuned! :)

I also tried my hand in the competition last year, but didn’t get success at all as my coding skill was lacking something which i have tried to improve with experience. But as a newbie i learned a lot , so i wanted to share some coding tips which i discovered during this competition.
  • Share/Bookmark

Also Read:


Article by Mani

Mani is a coder passionate about working in open-source projects. You can follow him on Twitter . If You have any questions feel free to write and add him to Gtalk - it will be nice to get comments and direct contact from you!

Mani has written 24 articles for us at TechTickle.

One Comment | Add your own!

  1. [...] This post was mentioned on Twitter by Sahil Malhan and slimb mani, TechTickle. TechTickle said: How to: Participate in Google Code Jam http://bit.ly/8Dqs9J (RT plz) #google #programming #codejam #codejam2010 #coding [...]

Leave a Comment