CodeChef is a non-commercial competitive programming community
Login
Username (New User? Signup) Password (Forgot Password?)
Signup
Login or
Signup with
Connect
Note
  • Publicize your achievements on your Facebook Wall.
  • Challenge your friends or ask them for help.

Site Navigation

  • PRACTICE
    • Easy
    • Medium
    • Hard
    • Challenge
    • Peer
  • COMPETE
    • All Contests
    • June Long 2012
    • May Cook-Off
    • May Long 2012
  • DISCUSS
    • Forums
    • Blog
    • Wiki
    • Facebook
    • Twitter
  • COMMUNITY
    • CodeChef Meetups
    • Campus Chapters
    • Host your Contest
    • User Groups
    • CodeChef TechTalks
    • All Educational Initiatives
  • HELP
    • Frequently Asked Questions
    • FAQ for problem setters
    • Problem Setting
    • Tutorials
    • Long Contest Ranks
    • Short Contest Ranks
    • Event Calendar
  • ABOUT
    • About CodeChef
    • Team CodeChef
    • Press Room
    • CodeChef Financials
    • CodeChef Sponsorships
    • CEO's Corner
    • Contact Us
    • About Directi
Home » Wiki » Uploading Problems

Uploading Problems

There are a lot of people who have interesting ideas for problems that can be put up in the practice section. Also, a lot of colleges have started hosting online contests on Codechef. Here is a small tutorial which will help you in your contest-hosting queries and also help you in uploading problems to our website.

Table of Contents 
  1. Q. How do I host a contest on Codechef?
  2. Q. How should the problem statements be formatted?
  3. NOTE: All problems statements must be saved in the ascii format as our system only recognizes these characters at the moment. Inclusion of any other special characters would cause an error within the system.
  4. Q. How do I upload a problem to your website?

 

Q. How do I host a contest on Codechef?


A. You should check out http://codechef.com/hostyourcontest for information on how you can host a contest on our site.

Q. How should the problem statements be formatted?


A. Please take a look at FAQ for Problem Setters for information on formatting problem statements and coming up with good test cases. If you are hosting a contest for your institute on our site, send an email to contests@codechef.com. Once the initial formalities are taken care of, you will be given problem setting rights for the duration of your contest. You will now be able to upload your problems on our website. Once you have uploaded all the problem send us: us the problem codes for the problems you have uploaded, the contest start and end dates, and points for each problem.

NOTE: All problems statements must be saved in the ascii format as our system only recognizes these characters at the moment. Inclusion of any other special characters would cause an error within the system.

Q. How do I upload a problem to your website?


A. Once your account has been granted problem setting rights or you are given access to an account with problem setting rights, go to http://campus.codechef.com and login with the credentials. Navigate to http://campus.codechef.com/problems/my. This page will look something like this.


The tab titled 'My Own Problems' shows a list of all the problems created by your account. If you want to edit any of the previously created problems, you may click on the link for that problem which appears under this tab and click on the 'Edit Problem' button which appears on that page. If you want to add a new problem, you may simply click on the 'Add Problem' tab which will take you to a page which looks like this. Let's take a look at the different fields and their significance.


1. 'Problem Code' : You might have observed that when you click on a problem name in any contest or in the practice section, you are taken to a link like http://www.codechef.com/problems/HX or http://www.codechef.com/OCT09/problems/HX . The term HX is the problem code. If you are uploading problems for a particular contest, then the codes for the problems you upload should follow some specific format. For example if your contest name is TP-Coder, you could have problem codes of TP01, TP02, TP03 and so on. Something of this sort is preferred so that it is easier to quickly find out which problem belongs to which contest. The code should be in capital letters and can include only alphabets and numbers. No other characters like commas, hyphens, spaces etc. are allowed.

2. 'Problem Name' : This is the title that will appear for your problem. On the contest page, your problem will appear with this name. For problem names, you can include spaces, alphabets and digits. No other characters are allowed.

3. 'Co-authored by' : This is a drop down box. Keep it at the default value of 'No one'.

4. 'Source code limit' : This is the maximum size(in bytes) of any source code that can be submitted for this problem. Any source code file which has a size greater than that mentioned in this field will throw an error saying that the file size is too large. You can keep it sufficiently large at the default value of 50000.

5. 'Resource' : If you want to attribute the problem idea to the original author or website, you can put it here.

6. 'Assessment type' : This should always be set to 'binary'. Only challenge problems can have an assessment type of 'maximize' or 'minimize'.

7. 'Test Data Ready' : If this box is unchecked, no one can submit solutions to the problem. This should always be checked, preferably only after the test cases have been uploaded and the problem is good to go.

8. 'Problem Body' : The problem statement formatted with html tags etc. as mentioned in the FAQ for Problem Setters needs to be pasted in this textarea. Delete any text that appears by default and paste the text for your problem.

9. 'Dynamic Content' : This checkbox should be kept unchecked. Check it only if you include links in your problem statement to content that can change over time.

10. 'Master Judge for multiple datasets' : This should be set to the default value of '1000. Generic Masterjudge'. Do NOT change this. Else, your problem will not be judged properly. Incase you would like to implement partial scoring within a contest problem, you will need to write and implement your own judge for the same. 

11. 'Available Languages' : You can select what all languages your problem can be submitted in here.

12. 'Include new languages' and 'Merge all languages in ranklist' : These should be checked.

Once you have filled in the necessary information, click on the button titled 'Create' and you will be taken to a page which will look something like this. Click on the link titled 'See problem page'. This will take you to your problem page. Now, you need to click on the 'Edit problem' button which will take you to the problem editing page. This page will look something like this. You will see that a few extra fields like 'Problem test sequence', 'Test data upload' and 'Rejudge Submissions' have appeared.

13. 'Test data upload' : By default, test case 0 has blank inputs and a time limit of 1 second. The input and output test cases need to be uploaded here. For the first test case you want to upload, click on the drop-down box titled 'Add/modify test case' and select 'Modify testcase #0'. In the 'Input file' textfield, click on choose and select the file containing the input data for the 0th test case. In the 'Output file' textfield, do the same for the file containing the corresponding output data. Select 'Overwrite' if you want to replace any previously uploaded file. Select append if you want to append the data you are uploading to the data uploaded previously. The time limit in seconds for that test case should be entered in 'Test case time limit' textfield. This should NOT exceed 50 seconds. If you want to simply change the time limit for a particular test case, keep the Input and Output file textfields empty and select the 'append' option for both and enter the new time limit for that test case.

14. 'Program Judge' : From the drop-down box select the appropriate judge. 'Ignores extra whitespaces' will match the output created by the solution submitted to the test data, but ignore any trailing whitespaces or newlines. 'Ignore FP round up to 10^-2' will check the output created by the source code submitted with the test output uploaded for that test case, rounding the value to 10^-2 precision and then checking the answers. 'Score is source length' can be used in shortest code contests. Usually, for normal contest problems, this should be set to 'Ignores extra whitespaces'.

Once you have done this, click on the upload button. Your test case along with the data uploaded should be available in the table above the 'Add/Modify testcase' fieldset.

If you want to add another test case, from the drop-down box select 'Add testcase #x' where 'x' will equal 'highest test case number + 1'. If you want to modify a particular test case, from the dropdown box select 'Modify testcase #x' where 'x' is the test case number of a previously uploaded testcase you want to modify.

Once all the test cases have been uploaded, you should scroll above to the 'Problem test sequence' text area. Here, add the test case numbers that you want to test submitted solutions against. Suppose you have uploaded 4 test cases numbered 0, 1, 2, 3 and you want to test submitted solutions only against test cases numbered 0, 2 and 3. Then, this text area should contain '#0 #2 #3' without the quotes. The values should be separated by a space.

15. 'Auxillary data passed to the judge' : This should be empty.

Check the 'Test data ready' checkbox as mentioned above and click on the 'Modify' button. Your problem is now ready and can be added to your contest.

You can add all other problems in the same manner. Once all the problems have been added, you can mail us the problem codes along with other details of your contest such as the contest timings and the points for various problems. The contest page will then be created and the URL would be given to you.



Comments

  • Login or Register to post a comment.

in point 13 above the in and

nutcracker19 @ 15 Mar 2011 12:21 AM

in point 13 above the in and out files should be of which format????

CodeChef is a non-commercial competitive programming community
  • About CodeChef
  • About Directi
  • CEO's Corner
  • C-Programming
  • Programming Languages
  • Contact Us
© 2009 Directi Group. All Rights Reserved. CodeChef uses SPOJ © by Sphere Research Labs
In order to report copyright violations of any kind, send in an email to copyright@codechef.com
CodeChef a product of Directi
The time now is:
CodeChef - A Platform for Aspiring Programmers

CodeChef was created as a platform to help programmers make it big in the world of algorithms, computer programming and programming contests. At CodeChef we work hard to revive the geek in you by hosting a programming contest at the start of the month and another smaller programming challenge in the middle of the month. We also aim to have training sessions and discussions related to algorithms, binary search, technicalities like array size and the likes. Apart from providing a platform for programming competitions, CodeChef also has various algorithm tutorials and forum discussions to help those who are new to the world of computer programming.

Practice Section - A Place to hone your 'Computer Programming Skills'

Try your hand at one of our many practice problems and submit your solution in a language of your choice. Our programming contest judge accepts solutions in over 35+ programming languages. Preparing for coding contests were never this much fun! Receive points, and move up through the CodeChef ranks. Use our practice section to better prepare yourself for the multiple programming challenges that take place through-out the month on CodeChef.

Compete - Monthly Programming Contests and Cook-offs

Here is where you can show off your computer programming skills. Take part in our 10 day long monthly coding contest and the shorter format Cook-off coding contest. Put yourself up for recognition and win great prizes. Our programming contests have prizes worth up to Rs.20,000 and $700lots more CodeChef goodies up for grabs.

Discuss

Are you new to computer programming? Do you need help with algorithms? Then be a part of CodeChef's Forums and interact with all our programmers - they love helping out other programmers and sharing their ideas. Have discussions around binary search, array size, branch-and-bound, Dijkstra's algorithm, Encryption algorithm and more by visiting the CodeChef Forums and Wiki section.

CodeChef Community

As part of our Educational initiative, we give institutes the opportunity to associate with CodeChef in the form of Campus Chapters. Hosting online programming competitions is not the only feature on CodeChef. You can also host a coding contest for your institute on CodeChef, organize an algorithm event and be a guest author on our blog.

Go For Gold

The Go for Gold Initiative was launched about a year after CodeChef was incepted, to help prepare Indian students for the ACM ICPC World Finals competition. In the run up to the ACM ICPC competition, the Go for Gold initiative uses CodeChef as a platform to train students for the ACM ICPC competition via multiple warm up contests. As an added incentive the Go for Gold initiative is also offering over Rs.8 lacs to the Indian team that beats the 29th position at the ACM ICPC world finals. Find out more about the Go for Gold and the ACM ICPC competition here.

Domain Name Registration, Web hosting, and Website Design provided by BigRock.com