CodeChef
  • PRACTICE
    • Easy
    • Medium
    • Hard
    • Peer
  • COMPETE
  • DISCUSS
    • Wiki
    • Forums
    • Blog
    • Twitter
  • COMMUNITY
    • CodeChef Meetups
    • Campus Chapters
    • Host Your Contest
    • User Groups
    • CodeChef TechTalks
  • HELP
    • Frequently Asked Questions
    • FAQ for Problem Setters
    • Ranks
    • Tutorials
  • ABOUT
    • About CodeChef
    • Team CodeChef
    • Press Room
    • CEO's Corner
    • About Directi

The new rating system

Posted by Aniruddha on August 28th, 2009 Filed in About, Features 26 Comments »

Greetings everyone!

We are happy to introduce a rating system for Codechef based on the contests we have every month. In brief, the rating system will have the following features.

1. Every user will have a rating. The user with the highest rating will be ranked 1, the user with the next highest rating will be ranked 2 and so on.

2. The ratings for the users will depend only on how they perform in the contests and not how they perform in the practice section.

3. Every contest problem will get a particular value based on the number of users solving that problem. The maximum value for a problem tends to the value 5 and the minimum value for a problem tends to 1. So, every user is guaranteed at-least 1 point for solving a problem. The selection of the value 5 was to give sufficient room for the top performers to increase their rating. Selection of a smaller range of values would let those participants solving only easy problems and participating frequently overtake those not participating frequently but performing exceptionally well when they do. Suppose the total number of users who have solved a particular problem is PS and the total number of users who have participated in the contest is TS, then the point value for a particular problem is 5 - 4*PS/TS. So, if there are more users successfully solving a problem, it’s value will be less and vice versa.

4. Suppose a user has solved P problems and at the end of the contest, these problems have the values V1, V2, .. ,Vp, then the total rating score S of the user for that contest will be V1+V2+…+Vp.

5. The new rating of the user will be old_rating+S.

Also, every user’s profile page will now have a rating graph along with the current rating and rank. Your feedback in this regard is much appreciated :)

Regards,
Aniruddha.

  • Share/Save/Bookmark

August Algorithm Challenge Ranks / Test Cases / Stats

Posted by Aniruddha on August 11th, 2009 Filed in About, Contests, Prizes, Winners 38 Comments »

Greetings,
We are very happy to announce the winners of our August Algorithm Challenge :)

Winners :

Top 5 (India):
1st - Varun Jalan (6.000)
2nd -Anshuman Singh (5.980)
3rd - Anil (5.979)
4th - Sumeet (5.964)
5th - Pradeep B (5.936)

Top 5 (US):
1st - Balakrishnan Varadarajan (5.991)
2nd - Kevin Chen (5.981)
3rd - Tomasz Czajka (5.976)
4th - Josh Metzler (5.965)
5th - Neal (5.940)

Statistics:

All problems are now available in the practice area. The test cases for the problems can be found here
Here are some additional statistics about the contest:

Length of Contest Unique Visitors Unique Participants Total Number of Submissions Percentage of user who have solved at least one problem
10 days 15,824 235 4867 35%


Country Total Participants Average Score per User
IN 164 0.751
US 41 1.866
Rest of World 30 2.494

Feedback:

This time we tried something different with respect to the challenge problem. A user could submit at most 20 times in a span of 24 hours. We would like your feedback regarding this.

  • Was a limit of 20 submissions a day enough or would you like more number of submissions?
  • Alternatively, should we revert back to the re-judging method that was followed for the July Contest?

We also need your feedback about the contest as a whole.

  • How would you rate the contest problems?
  • Were they easier/similar/difficult compared to the previous contests?

Also, if you have any kind of feedback related to the contest or otherwise, feel free to comment.

Mini Challenge:

Lastly, as you all know, we will be having a shorter contest later this month. The August Mini Challenge will be held from 22nd August 15:00 IST to 24th August 15:00 IST. This will consist of a single challenge problem with no limits on the number of submissions. Hope to see you all there.

Regards,
Aniruddha.

  • Share/Save/Bookmark

Rule Change for August Contest / Guidelines for Disqualification

Posted by The Chef on July 29th, 2009 Filed in About, Contests 21 Comments »

Crème brûlées,
Based on the feedback we received from the July contest we have slightly modified the rules for the August Challenge. This time around we will not be rejudging submissions with new test data. To prevent people from precomputing solutions we will limit the number of submissions to the challenge problem to 20 per calendar day. We will reevaluate after the competition to see if this method has the intended results.

We would like to mention once and hopefully for the last time the guidelines for disqualification:

  • Any form of collaboration including (but not limited to) discussing problems, asking someone to review your code, asking for output for a set of inputs, posting questions on other forums, etc…
  • Hardcoding output for a specific set of inputs. It is ok to run tests to verify the size of inputs and some min/max conditions to help you design your algorithms. But hardcoding output for a specific set of inputs is not allowed.

We reserve the right to ban users based on suspicion of cheating.

We are also happy to announce a weekend long competition at the end of August. Details on this will be announced soon. We are also planning a team based competition for September, this may be judged in the style of ACM-ICPC competitions (time-based, penalities for incorrect submissions). We’ll let you know.

Best of luck!

Cheers,
Cheffy

  • Share/Save/Bookmark

FAQ for problem setters

Posted by Aniruddha on July 24th, 2009 Filed in About 1 Comment »

For the past few weeks we have been getting questions from people interested in setting problems for our contests. Here is a quick FAQ as to what you need to do before sending us the problems and if/how your problems will be used in our contests. Now, at present, we have 2 types of problems in our contest. The first category is the exact algorithm contest problems which have either a wrong or a correct answer. The other type is the challenge problem that we have in each contest. This problem is such that it does not have a deterministic solution. Which means that there is no algorithm that will give an optimal answer for the problem. Submitting problems for both these categories is slightly different.

Exact Algorithm Problems :


Q. What kind of problems are you looking for in the Exact Algorithm Problems category?

A. We are looking for problems which are not standard ones or ones which are not easily ‘googleable’. The problem should be such that it induces the solver to spend time to think of a solution to the problem rather than search for it online.

Q. What files do I need to submit along with the problem?

A. You need to submit the following files :
1) The problem story line. This is the main body of the problem that the participant will read. This should not be ambiguous and should be clear and interesting. It should specify the input format, the output format as well as the constraints on the input and if any, on the output.
2) The solution in a programming language of your choice. This solution should be such that it takes in the input data in the specified format and produces the correct output according to the output format.
3) The test input data. This input data should have all the corner cases covered and should have a few randomly generated test cases too. If there are multiple input files, label them as 0.in, 1.in, 2.in and so on and place all of them in a folder called ‘input’.
4) The output test data. This is the output data corresponding to the input data mentioned previously. The expected output for 0.in should be placed in 0.out, for 1.in should be in 1.out and so on. Place all these files in a folder called ‘output’.
5) A small write-up of the approach taken. You need to give us a small write-up about the approach taken to solve the problem.

Q. How do I send you all the files?

A. Place all the files and folders in another folder named whatever you wish to call the problem. Archive it using an archiver, preferably in .zip or .tar.gz format. Send this archived file as an attachment along with your contact information to admin@codechef.com

Q. How many problems can I submit?

A. You can submit as many problems as you like. If we like a problem, we will use it in one of our contests. If we decide to use your problem in our contest, you would not be eligible to participate in that month’s contest. You might want to send us a set of 4-5 problems so that we might use a higher number of problems in the same contest.

Q. How much do I get paid for submitting the problem?
A. There is no payment for submitting a problem. However, if we decide to use your problem in our contest, we will compensate you accordingly. The compensation would depend on the quality of problems you have submitted. An easy problem would have less compensation compared to a hard one.

Challenge Problems :

There are a couple of things different for challenge problems.

Q. What kind of problems are you looking for in the Challenge Problem category?

A. We are again looking for problems which are not very highly researched. The approaches for such problems should not be available online easily. The problems should not have a polynomial time solution. The challenge problem has a scoring mechanism based on certain parameters. This scoring mechanism needs to be explained properly in the problem statement submitted by you. Also, you need to specify whether the optimal solution minimizes this score or maximizes this score.

Q. What files do I need to submit along with the problem?

A. You need to submit the following files :
1) The problem story line. This is the same as the earlier category. Along with the constraints and other things, you need to mention how the problem is scored and also whether the optimal approach should maximize or minimize the score.
2) The input test data. This should have random and large test cases. Place all the input files in a folder called ‘input’.
3) A program in a programming language of your choice that reads the output and returns the score for that output based on the scoring parameters.
4) A write-up specifying why the problem does not have a polynomial time solution. Some links or research papers pointing to this would be appreciated.

  • Share/Save/Bookmark

July Algorithm Challenge Winners / Test Cases / Stats

Posted by The Chef on July 15th, 2009 Filed in About, Contests, Prizes, Winners 6 Comments »

Pumpkin Pies,
We are pleased to announce the winners for the July Algorithm Challenge.  Drum roll please…

Top 5 (India):
1st - Varun Jalan (6.886)
2nd -Ashutosh Mehra (6.873)
3rd - Imran (6.868)
4th - Prunthaban K (6.854)
5th - Surendra (6.815)

Top 5 (US):
1st - Tomasz Czajka (7)
2nd - Josh Metzler (6.97)
3rd - Balakrishnan Varadarajan (6.964)
4th - Rahul Garg (6.917)
5th - Chris Narrikkattu (6.904)

All problems are now available in the practice arena. Test cases for all contest problems can be found here in three parts: Part 1, Part 2, Part 3.

Here are some additional statistics about the contest:

Length of Contest Unique Visitors Unique Participants Total Number of Submissions Percentage of user who have solved at least one problem
12 days 8,387 406 9656 57%


Country Total Participants Average Score per User
IN 279 1.25
US 63 1.99
Rest of World 64 2.30

There was definitely room for improvement in this contest, and we hope to incorporate all the feedback we have received into making the next contest an even bigger success.

Thank you to everyone who participated.
Cheers,
Chef

  • Share/Save/Bookmark

Important Rule Change for July Contest

Posted by The Chef on June 30th, 2009 Filed in About, Contests 8 Comments »

Chocolate Shakes,
We’ve had some complaints in the last contest about participants reverse engineering test data. While this isn’t necessarily “wrong,” in keeping with the spirit of finding the best solutions to the problems given, we’ve instituted a small rule change. This time around, the challenge problem will be rejudged at the end of the contest, with entirely new test data.

We considered other approaches for all problems including:
* Rejudging all solutions at the end of the contest with new test data (not just the challenge problem)
* Capping the number of submissions per user per day
* Allowing users to only submit solutions at certain time intervals (i.e. one solution per five min)

In the end we have done our best to come up with better, bigger and more random test cases and are holding off on these other change (for now). If you believe there are additional ways to improve the contest format, please let us know.

Cheers,
Amit (The Chef)

p.s. if you wanna see how pretty I am, check out our new Twitter background.

p.p.s don’t forget our first DesignChef competition along starts tomorrow, help us out… spread the word.

  • Share/Save/Bookmark

Frequently Asked Questions

Posted by Aniruddha on June 29th, 2009 Filed in About 38 Comments »

Well, a lot of people seem to be having the same kind of questions across different forums and different problems. Here is a brief list of questions that have been coming up quite frequently over the past few weeks, and some hints on what you should do to solve the issue.

Q. What compilers do we use?
A. The compilers for the different languages are specified when you select the language while submitting the  solution. Code compiled on other non-standard compilers cannot be guaranteed to compile on the online judge system.

Q. What are the system specifications?
A. As of now, the specifications of the system on which the judge executes the solutions are :
Operating System : Gentoo Linux
Processor : Quad Core Intel running at 2.33 GHz
Memory : 4 GB of RAM (64 MB guaranteed for each submission)
Storage : 160 GB effective storage using SATA RAID 0 configuration
Network Link : 144 Mbit maximum throughput

Q. I can’t seem to find the compilers being used by Codechef. Can you give me a link?
A. The IDEs / Compilers / Interpreters for some commonly  used languages are listed below.
C / C++ : You can use the Dev C++ IDE if you are on windows - http://www.bloodshed.net/dev/devcpp.html
Java : Download the Java Development Kit from the Sun website - http://java.sun.com/javase/downloads/index.jsp
Python : Download the python interpreter from - http://www.python.org/download/
Perl : Download perl from http://www.perl.com/download.csp
Ruby : Download it from http://www.ruby-lang.org/en/downloads/
C# : Download it from http://www.microsoft.com/express/vcsharp/

You can use flags like -O2 in C or C++ to turn on compiler level optimization.

Q. Why does my code compile fine in Turbo C but not on the Codechef Judge?
A. The Codechef Judge uses the GNU compiler collection. Turbo C uses some non-standard headers and as such should not be used. A standards compliant C code written under Turbo C will compile fine on the online judge.

Q. Can I include the file conio.h?
A. No, conio.h is not a standard header file and as such is not available under the GNU compiler collection. Code which includes conio.h will not compile on the online judge.

Q. What should I name the class in a java solution?
A. You should name the class as Main. Failure to do so will result in a compilation error on the online judge system.

Q. Do I need to take the input for all testcases at once before processing it?

A. No, you need not take all the input at once. You can take the input for a particular test case and output the answer and then proceed to the next test case. Program should read from standard input and write into standard output. There is no need to read all data first, compute them all and then print all output. It is recommended to read and write data as simultaneously. Technically, server redirects standard stream to files. You can test you programs in the same way at home.

Q. Can I get the input for which my program failed?
A. Currently it is not possible to get the input for which your program fails. Thinking out corner cases is a part of the fun associated with algorithms :)

Q. How do I take input for problems which do not specify a distinct terminating condition or the number of test cases?
A. In cases where the total number of test cases are not specified or some input doesn’t serve as the terminating input, you are expected to take input till an EOF marker is encountered. While testing, you can terminate the input in the command line by pressing the <ctrl> and <z> keys together.

Q. How do I get the execution time of a program in Linux?
A. After compiling the program, say you have the output file with the name ’solution’, then, you can get the execution time by using the command “time ./solution”. The sys and user times are what you should be looking at in the output.

Q. The code runs within the time limit on my system, but I get a TLE on Codechef. Why is that so?
A. TLE stands for Time Limit Exceeded. The configuration of your system might be different from the one we use. You need to optimize your algorithm or come up with a better algorithm.

Q. I can’t even take input or print output within the time limit, let alone processing the input. What should I do?
A. Make sure you have submitted an efficient solution to http://www.codechef.com/problems/INTEST/ and http://www.codechef.com/problems/TEST/ and make sure you read http://blog.codechef.com/2009/02/24/54/

Q. The time limit for the problem is 2 seconds, but some accepted solutions take more time. How is that possible?

A. This can happen if the problem has multiple test case files. The time mentioned in the constraints is per input file. If there are multiple input files, then the total time taken for executing all of them is displayed. For example, if the time constraint for the problem is 2 seconds and there are 8 input files, then your program must take at most 2 seconds for any particular input file, but the total time displayed will be the sum of the execution times for the 8 input files and this may exceed 2 seconds.

Q. Why do I get an error called SIGSEGV?
A. A SIGSEGV is an error(signal) caused by an invalid memory reference or a segmentation fault. You are probably trying to access an array element out of bounds or trying to use too much memory. Some of the other causes of a segmentation fault are : Using uninitialized pointers, dereference of NULL pointers, accessing memory that the program doesn’t own.

Q. Why do I get an error called SIGABRT?
A. A SIGABRT is caused if your program aborted due to a fatal error. This can also be caused if you are using an assert() which fails or an abort().

Q. Why do I get an error called SIGFPE?
A. A SIGFPE is caused by a floating point error. Your program is encountering such an error, probably a division by zero or some similar undefined operation.

Q. Why do I get an error called NZEC?
A. NZEC stands for Non Zero Exit Code. Usually, returning non-zero values from main() will cause this error. It helps telling crash from WA (Wrong Answer) with interpreted languages. Typically this would happen if you omit a return 0; from main() in C. For interpreted languages or Java/C++, this could happen if your program threw an exception which was not caught (e.g. Trying to allocate too much memory in a vector).

If you have any other questions, do post them as a comment and we will try to incorporate them into the FAQ.

  • Share/Save/Bookmark

Gamer’s Challenge Winners!

Posted by The Chef on June 19th, 2009 Filed in About, Prizes, Winners 3 Comments »

Egg Biryanis,
We are pleased to announce our winners for our first ever Gamer’s Challenge. (drum roll please….)

First Place:
Kushagra Gour - Chef of War - All around awesome game, well done!

Second Place:
Meet Shah - The Spoon Hunt - This game was a lot of fun to play (a staff favorite), we wish the graphics were a little better.

We have some other “honorable mention” awards, winners of these will each receive t-shirts.

Best Looking Game
Jugal Manjeshwar - CodeName Chef - Beautiful game, gameplay is repetitive though. By varying the enemies on different levels or including some power-ups this could have been great.

Best Javascript Game
Nikhil Marathe and Denny George - Little Chef - Hilarious story, we really enjoyed it. Game is too hard/quick though.

Best Game by Someone Who has Already Won a Prize
Kushagra Gour - Squash the Bugs - Another great game

Best Use of Binary Dumps and Dangling Pointers
Rasagy Sharma - Run Chef Run - Excellent concept for a game, love the floating pointers. Gameplay is original as well.

Thank you everyone who participated, this was a lot of fun for us, hope you enjoyed it as well. We will have other types of gaming contests in the future.

Update Aug 3rd… We now have photos of the winners with their prizes


Kushagra Gour - 1st in the May Gamers Challenge

Kushagra Gour - 1st in the May Gamers Challenge




Meet Shah - 2nd in the May Gamers Challenge

Meet Shah - 2nd in the May Gamers Challenge


Cheerio,
Da Chef

  • Share/Save/Bookmark

July Contest open to US Participants (separate prizes for India and US)

Posted by The Chef on June 18th, 2009 Filed in About, Contests, Prizes No Comments »

Banana Pancakes,
We are pleased to announce that prizes for the July Algorithm Contest will be available for participants in the US.

What’s the July contest format?
The contest will begin on July 1st at 15:00 IST and end on July 13th at 15:00 IST. Although this is longer then the last 10 day contest, we wanted to give you that extra weekend. The contest will have 6 to 8 problems with one challenge problem (identical in format to our June and May contests).

Will participants in India and US be competing against each other?
…only in spirit. The contest problems and format will be exactly the same for all participants. The rankings will be combined, but the top 5 scorers in India will receive prizes and the top 5 scorers in the US will receive prizes.

blahbity blahbity blah, tell me about the Prizes already
Aright aright, here is the tentative prize breakdown (please note this is subject to change and will be finalized by July 1st).

US:
1st - $700
2nd - $400
3rd - $250
4th - $125
5th - $75

India:
1st - Rs. 35,000
2nd - Rs. 20,000
3rd - Rs. 12,500
4th - Rs. 6,250
5th - Rs. 3,750

What happens if there is a tie?
In the unlikely event of a tie, we will split the prize money across the participants. For instance if the 3rd and 4th place US participants tie, they will each receive ($250 + $125) / 2 = $187.50.

Wait a second I’m from [insert country that isn't US or India] does that mean I can’t participate?
Sure you can participate, though unfortunately you can’t win the cash prizes. If you make it to the top of the leaderboard we will be sending you some sweet CodeChef merchandise (we’ve got some dope new t-shirts in the works). We are exploring the idea of expanding into other geographies and will let you know as soon as we do.

Are you making any other new changes soon?
Yes, you will be seeing some big changes to the site in the next few weeks, we’ve received a lot of feedback in terms of how we can improve the site and are working on developing CodeChef 2.0. We will show you a sneak-peak of some of these new features soon.

A lot of people have complained that a 10-day contest it too long. Worry not CodeCheffers, next month we will also hold a shorter contest.

Anything else you want to tell us about?
Oh yeah, we also launched DesignChef last week, a non-profit, online graphic and user experience design competition. Check it out!

Best of luck to everyone! If you have any suggestions, questions or feedback please let us know on Twitter, Facebook, our Forums by posting your comments here.

Cheers,
El Chefarino

  • Share/Save/Bookmark

Opening up the Kitchen

Posted by The Chef on March 25th, 2009 Filed in About, Features 12 Comments »

Hash Browns,

Our goals with CodeChef are to challenge and engage the developer community as well as provide a platform for competition and improvement.  We’ve heard from many people that when they get a wrong answer or time limit exceeded they aren’t sure how to debug their submissions.  We are working on a few ways to improve this:

  • Additional tutorials describing various approaches to debugging and reducing execution time.
  • An interactive mode which allows you to specify inputs which will run on our testing infrastructure and display the output (possibly only available in the practice arena).  This will allow you to debug any infrastructure or compiler differences and see how your code runs on the machine it is evaluated on.
  • Additional information on submissions (possibly only available in the practice arena) - For each test case, the number of inputs, the result, execution time and time limit.   This will let you know if your approach is correct and you just need to optimize your solution to fit within the time limits, or if it’s back to the drawing board.

For our April Contest, we will also be experimenting with another major change.  After the contest is over we will make all code submissions for problems within that contest, publicly available.  Eventually we plan to allow comments on individual submissions as well.  We hope this will allow less experienced developers to learn from their peers and generally promote knowledge sharing.  We look forward to hearing your feedback on these initiatives.

Cheers,

The Chef

  • Share/Save/Bookmark
« Previous Entries

Programmer of the Month

Name : Anton Lunyov
Age : 23 yrs
Inst/Company : Institute of Applied Mathematics and Mechanics of National Academy of Science of Ukraine
Userid : anton_lunyov

Find out more about the person behind the username anton_lunyov

    Recent Posts

    • New Prize Structure for Monthly Contests
    • Programmer of the Month for September’10: Anton Lunyov
    • CodeChef August 2010 Cook-Off Results
    • A few changes in CodeChef
    • Blog comments working now.. we missed you.

    Categories

    • About (12)
    • Announcement (33)
    • Campus Chapters (4)
    • Contests (49)
    • Events (15)
    • Features (11)
    • Meetup (4)
    • Open Source (1)
    • Practice Problems (5)
    • Prizes (18)
    • Programmer of the Month (14)
    • Tech Talks (2)
    • Tutorials (15)
    • Winners (22)

    Recent Comments

    • Maxim on New Prize Structure for Monthly Contests
    • Gunjan Sharma on Programmer of the Month for September’10: Anton Lunyov
    • Zakir Ahmed on New Prize Structure for Monthly Contests
    • Basil (Admin) on New Prize Structure for Monthly Contests
    • zhuxian on New Prize Structure for Monthly Contests

    Recent Pictures

    Twitter Badge



    Blogroll

    • Agile Developer
    • Agile FAQs
    • Bhavya Siddappa
    • Come On Code On
    • Manish’s Tech Blog
    • Planet Floss India
    • Rahul Sundaram
    • Sandeep Shetty
    • The Geek Blog
    • Vineet Gupta

    Archives

    • September 2010
    • August 2010
    • July 2010
    • June 2010
    • May 2010
    • April 2010
    • March 2010
    • February 2010
    • January 2010
    • December 2009
    • November 2009
    • October 2009
    • September 2009
    • August 2009
    • July 2009
    • June 2009
    • May 2009
    • April 2009
    • March 2009
    • February 2009
    • January 2009

    Company Blogs

    • Directi
    • .pw Corp Blog
    • CEOs Blog

    Careers@Directi


    • About CodeChef
    • About Directi
    • CEO's Corner
    • CodeChef Campus Chapters
    • Blogger Community Program
    • User Group Outreach Program

    © 2009, Directi Group. All Rights Reserved.

    Sponsors