Will CodeChef provide test cases

People identified that the testcases were wrong in a recent lunchtime; see e.g.

If you are really desparate in knowing the the test case, what you can do is take an accepted solution and generate some random cases and check it on both codes . Use some script so you don’t have to manually input the cases each time

1 Like

I use this for generating sample cases to run my code on.

I write a bruteforce code, and an optimized code (which I have to debug) and run randomly generated Testcases on both. The cases which give different answers usually point out the error.

1 Like

Anyone who finds not knowing the testcases exciting can simply choose not to look at the testcases. Providing testcases allows those who find not knowing testcases exciting to keep their excitement, while also allowing those who find it frustrating to minimize their frustration.

Thank you. That was actually helpful.

I agree that the test cases should be shown as its extremely difficult in some situations to figure out the error by just staring at the screen and thinking.
Also, if the test cases are shown, its the discretion of the user if he/she wants to use those “spoilers” or not.
But, atleast give that option to your user!

1 Like

bhaiya koi reply ni krta editorial wale page par
maine bhi to sahi kia hai

what s wrong with my code bro please explain
have a look on this

Problem CODE=HDDN

Coding Blocks IDE

I still don’t get the logic behind not showing the test cases in practice mode.

@admin your point of making it exciting/difficult is contradictory in nature as you’re revealing the actual codes for the solution. If the codes were hidden with only the editorial and the test cases revealed, it would have been a better learning experience.

IMHO, at least for the beginners, practice and repetition of actual problem solving are more important than getting stuck at easy to medium-easy problems where they made some silly implementation error. Also, you’re taking away the motivation for someone fresh and making the learning curve really steep not because of the difficulty of the problems but by the way, the system is set up.
Suppose there is a really persistent beginner, he spends 2-3 days on an easy problem which he implemented in few hours but made a really silly error and after getting frustrated with it, he spots the error or simply copies some random code and submits it. What is the trade-off we talking about here? Are those 3 days worth for learning about some silly implementation error? Shouldn’t by providing the test cases and letting him move on with a new problem made the experience really worthwhile? He probably would have done more problems, got introduced to new algorithms(which is really essential). Instead, he probably would have gotten demotivated and simply quit. You guys gotta realize that the logic is really flawed here. That’s my two cents.

I request @admin please no matter what happens…never provide test cases.
A few pending questions that will never be solved won’t make any difference in one’s life, but on the other hand providing the test cases will surely reduce the difficulty of problems by a large fraction.
I have seen improvements in me! providing test cases will be an act of cheating for budding programmers.
NEVER DO THAT!!!

If I was asked about this before I would have been totally against the idea of opening the testcases. But what happened with me in April 2020 Cook-off Div 1 really frustrated me. I tried the question MINOPS and was very sure of my solution but it gave WA and it is understandable. I tried to reach out on discussions as I couldn’t figure out my mistake and @priyansh19077 was very kind and patient in understanding my logic.
Now if a programmer more experienced than me says that he couldn’t find anything wrong with my code, it really puts me at a very frustrating situation and now I really wish I could see that testcase where my code failed, because that’s how learning happens, right? I hope @admin comes up with a constructive solution to deal with this.

MINOPS problem page
Thread where I tried seeking help
My solution

P.S. Now I know some might tell to look at accepted solution, while that works most times, but every user approaches a problem differently. So that way you find out ‘one correct way’ to solve it but my doubts regarding my own code still remain unsolved.

Thanks for reading so far.
M

5 Likes
1
babbbaaaaaaab
aaaaaaaaaaaaa

Your code fails on this test case
I believe the answer should be 12.

Showing the system tests won’t be helpful anyways. They are usually more than 10000 characters long, and cannot possibly be debugged by hand.

3 Likes

Thank you so much for this, yes my code gives out 13 as the output. It now makes sense why the editorial suggested sorting the gap lengths in the string. Thanks again! :slight_smile:

This post was flagged by the community and is temporarily hidden.

1 Like

but atleast we can see what is wrong,
I mean
for example if a problem asks for finding a some thing like minimum value,
and we get a WA , we can atleast see if our algo is giving more value or less compared to the actual answer…
that way even though we may not be able to analyze the full test case, we may still have rough idea of where we are wrong

1 Like

Atleast provide test cases in practice section.

@ps_1234 - you can check out this thread - New Feature - WA Test cases - #21 by shashank2208

You should consider revealing failed testcase for problems in practice set. It is possible that my algorithm is completely different from others and is not passing few special testcases. I do support that failed testcases should not be shown in a live contest submissions.

@leapkk - failed test cases are provided in practice - when you get a WA - you can click on debug my code to get the failed cases.

Thanks for pointing it out! But I cannot see the same in my system. Probably it’s premium feature.

@leapkk - this is a custom judge problem (multiple solutions possible) - these type of problems are currently excluded from the WA service.
WA test cases covers approx 85% problems till 2500 difficulty rating. WA for custom judge problems will be live by next month.

You can read more about this here - New Feature - WA Test cases