Test Cases for Contest Problems can be revealed after the contest!

There are many people whose solution fails for few test cases and hence get partially correct answers in the contest.

For Ex: Many people have got 85 points in LIGHTHSE and 60 points in REBXOR in the September Long Contest which means they have all failed to pass the 1st Subtask which might have contained some special/boundary cases.

To help people know their mistakes Codechef can post the Test Cases along with the editorial as people will be able to identify the mistakes in their own code which will be of great help.

Please upvote if you feel this is good idea! :slight_smile:

@admin : Let us know your opinion too.


Great suggestion … please do consider this @admin


Yes , it is a great idea. Test cases should be provided ,it will benefit us all.


This is really a great idea as we will be able to solve the problem in our own way instead of following approach given in the editorial.


Giving testcases has its downfalls. People intending to practice later on could cheat. Rather gve testcases to only those who pass certain testcases. And also use the ‘hackos’ system that hackerrank uses.

1 Like

Yep. Should be done once the contest is over and problems are moved to practice section.
This was one of the reason why i practice more on codeforces then codechef. Its better to know where your code is failing rather then giving up and following editorial solution atlast.


Yes the test case should be provided otherwise we don’t get to know where our program is failing.


Good idea.


Not in favour, strongly disagree.


I think its good to provide test cases after the contests get over, if you are cheating,then you are cheating to yourself only.


When i face such problems like only one subtask showing WA after going through common mistakes like not using long int, parsing to wrong data type, dealing with garbage values etc etc…

I always write a brute-force solution and use a python script to generate random test cases and execute both the solutions simultaneously and wait and pray :stuck_out_tongue: for the script to throw up the relevant test case.

Here is the script i use mostly

import random
import os

#program to generate random test cases
#and find the failed test case of the solution using brute force solution

#generate random test cases 
def generate():
	for i in range(0,N):
	return strs

for i in range(0,100):

Yes, this is a great idea… We can even know how large the inputs can be, how our solution is tested , how the author sets boundary cases, and hence we can understand the problem completely!

1 Like

Good idea! ,test cases should be given so that without wasting much time on same problem we can quickly learn from our mistakes and proceed to next question because sometimes it happens that even after giving lot of time we are not able to figure out one silly mistake.
So thumbs up for this idea.

1 Like

I dont think its a good idea at all. New programmers tend not to put their brains in the problem when presented with solution or tricky test cases. This has alot of disadvantages, and if they do that, they will never be able to change a WA into AC in a live contest. This happens in topcoder practice rooms all the time.

Again, If you are stuck, you must see solutions of other coders and compare them to your own, check for overflows. Thats how you learn.


I am requesting codechef to please provide test case of practice problem.
otherwise user will start moving to hackerearth,codeforce,hackerrank type of site where they provide test case of practice problem.
It is very important part of programming to know where are the mistakes.
when you know the mistakes then only you can grow/progress otherwise there is no point of solving question on codechef.


@admin i agree with this opinion at least the case at which our solution fails should be available.
And especially for practice problems. At times it become really difficult to learn as a beginner and instead of finding my own mistake i have to follow editorial’s approach or check someone’s solution.

1 Like

I agree with you. Codeforces has this system, Codechef can also have it. Admin said that they are changing their whole contest hosting procedure, they might add this feature.

The question title made me think that CodeChef actual did this.

can you give me more test cases for SAMESNAK problem in Snakdown 2017?

ya its very important sometimes i got WA in two test cases and when i ask my friend who codes the same logic in python he got AC so in such cases giving test cases is most important.