How to upload partially graded problem on CodeChef

I wanted to add partially graded problem (subtask type/ IOI styled problems) on CodeChef. How should I do that.

2 Likes

Only users who have problem adding access on CodeChef will be able to do this. Partially graded problems are called “Subtask problems”.

For general instructions on uploading problems, please refer to https://docs.google.com/document/d/1-HeCoktjNKfOxUjQHS-vaiz2xcPPYowJ3NEbjGp8le4

The master judge for subtask problems can be found here: http://campus.codechef.com/files/judge/1003/. You need to select this while adding the problem.

The rules will be slightly different than that for other problems. We have to select the following while editing a problem:

Problem type: classic
Assessment type: subtask type
Master judge for multiple datasets: 1003 (Generic Subtask Partial Judge).

The next most important part is to use the following setting:
Auxiliary data passed to masterjudge: Here, we first need to provide the number of subtasks, followed by the score of each subtask which is followed by the mapping of each test case (in the order in which the test files appear in the ‘test data upload’ section) to the subtask.

Let me give you an example:
Say we have 3 sub-tasks and eight test files. The entry in the Problem test sequence is: “#0 #1 #2 #3 #4 #5 #6 #7”. It can also be “#1 #2 #0 #7 #4 #3 #6 #5”, and it wouldn’t make any difference. The order does not matter.

And let us say that the mapping of the test files to sub tasks is this:

  #0 - 1
  #1 - 1
  #2 - 1
  #3 - 2
  #4 - 2
  #5 - 3
  #6 - 3
  #7 - 3

Now say we want to give the following score for each subtask:

subtask 1 = 40,
subtask 2 = 25,
subtask 3 = 35.

So what we need to enter in the “Auxiliary data passed to masterjudge” field will be: 3 40 25 35 1 1 1 2 2 3 3 3.

NOTE: There can be minimum 1 subtask and maximum 16 substasks.

With this setting, we will achieve what we wanted. Also you may view the status of each test file at this link: http://campus.codechef.com/error/solution-id.

Hope you got your answer :slight_smile:

Happy Coding!

Regards
Team CodeChef

5 Likes

Hello, I am trying to set problems for a personal contest with subtask scoring property. I am following the exact format given above but the submission is showing a question mark at the status and a cross sign indicating wrong answer is appearing. However the same test files are working with a binary type scoring contest. Please help.

You can contact codechef admins. You can even contact me on praveen@codechef.com