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.

1 Like

Only users who have problem adding access on CodeChef will be able to do this.

The new master judge can be found here: 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 of Problem test sequence) 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

What this means is that first #0 test case will be evaluated then #1, then #2 and so on, until #7 is evaluated.

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 substaks.

With this setting, we will achieve what we wanted. Also you may view the status of each test file at this link:

Hope you got your answer :slight_smile:

Happy Coding!

Team CodeChef


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