Will CodeChef provide test cases

I tried nearly 10 to 15 different test cases and it is working fine for each of them.
If possible just let me know the input for which my program fails as I have tried everything from my end.
I only want to know about the input so I could modify my program accordingly.

Here-

Input
1
4
NNIN

Your Output
NOT SURE

Expected Output
INDIAN

It is an Indian as it both performs the ‘I’ gesture- which no foreigner does as told by problem statement.

Thank You :slight_smile:

I wont be able to learn if I keep making the same mistake over and over again. I don’t want test cases during a competition. All I need is one or two failing test cases in the practice section so I can debug my code and see where it is going wrong and see what mistakes I made so that I can rectify it and not make the same mistakes in the future. Is this too much to ask for?

1 Like

It’s not exciting, it’s frustrating. I have a solution to a problem that appears to be the same algorithm as another solution that got the right answer, yet I have the wrong answer. I’ve generated several testcases, but haven’t been able to figure out what is wrong with my code. Without seeing the failing testcase, it leads me to suspect that the problem is with the testcase, not my code. There’s no way we can check to see if in fact the testcase is wrong as sometimes happens. On Codeforces, for example, someone occasionally spots an error with a testcase, and it gets corrected. There’s no way that can happen when you don’t reveal the testcases even after the contest.

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.