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

Good idea.

2 Likes

Not in favour, strongly disagree.

2 Likes

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

2 Likes

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():
	strs=""
	N=1
	strs+=str(N)+"\n"
	for i in range(0,N):
		strs+=str(random.randint(1,100))+"\n"
	return strs

for i in range(0,100):
	strs=generate()
	p=open("inps12.txt","w")
	p.write(strs)
	p.close()
	
	proc=os.popen('bruteSolution.exe<inps12.txt')
	Act_output=proc.read()
	proc.close()
	proc2=os.popen('optimizedSol.exe<inps12.txt')
	My_output=proc2.read()
	proc2.close()
	if(Act_output!=My_output):
		print(strs)
3 Likes

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.

2 Likes

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.

2 Likes

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

Some people cheat even now by submitting other’s solution as they can see everyone’s solution in practice. So, nothing can be done with them.
Giving test cases will help people who really want to solve problems on their own.

2 Likes

Yeah, but the hackos system would be great. There should be a limit to the number of questions you can ask test cases for.

1 Like

@admin Any update on this? :frowning: :?

@vsp4 : The admin has said that they will have to discuss more on this topic.

Suggestion - They can adopt the system of codeforces in which we can see the testcase which fails to pass.

3 Likes

“People intending to practice later on could cheat”
Cheat whom? They would only cheat themselves and will not learn. That won’t be a problem for anybody else, so I don’t see why giving out test cases has downfalls.

1 Like

Not allowed. The contest is STILL on going.

1 Like