my humble request to @admin to share test cases of contest problems with editorial, or provide feature to see test cases during submission after contest gets over…
while practicing one get WA, TLE or whatever error it must show testCases where code is failing similar to codeforces, hackerRank, hackerEarth etc. plateforms…
Reason is simple, during practice, when we try to upsolve contest problem, it will save our time to figure out what’s wrong with our code
whenever we gets WA, then we try our best to figure out corner cases where code is failing, if succeed than its good
but if do not gets succeed than we post link to our submission on discuss, and we have to wait someOne will tell us corner case… most of times on codechef Discuss forum, someOne helps to figure out in which test case code is failing but someTimes we do not get replies…
if we know test cases, then we can figure out by ourselves where code is failing… and it will save our time to post “find where code is failing” type question on discuss and will also save others time of answering those questions…
i am facing this issue to figure out whats wrong with my june long challenge “TWOFL” problem
sorry for by bad English…
I recommend you to not post your code on forums, asking for which corner test case your code fails.
That said, figuring out the corner test cases also comes under skills which you will learn by yourself. If test cases are available to you then you won’t think of them, But suppose in your ACM-ICPC regionals you know how to solve 5 problems but 4 of them are giving W.A. due to some corner test cases, what will you do then??
This skill to figure out the corner test cases will come to you only if practiced over time .
Codechef is better as it is.
@vijju123 I think the problem setter and tester will have worked hard for getting corner cases included in a particular problem… They why to keep a load on editorialist for the same… I mean setter or tester can also give some small corner cases separately with their question for editorials… It will be a “cake-walk” thing for them as they will have spend some time for making test cases files…
So by this even if editorialist is in hurry (which u were last time) then too people can get help…
Most of you are saying debugging is important skill which obviously true. But what you are forgetting is many time after hours of trying to debug you still don’t get why it isn’t passing. Then you just give up on the problem, you can’t go on forever. Instead if you know where your code is failing then you can try to correct your code. In any case if you don’t want to see the test cases you don’t have to nobody is forcing you.
UVA online judge has an excellent utility udebug for comparing outputs to given test cases they provide. I think if you provide the test cases someone can work to make such a utility available to people.
It would be very much helpful in debugging the code
The few issues that come to our mind while implementing this issue are as follows.
What do we do if your submission fails on a very large case? In that case, if we allow downloading the test files, then one can simply download all the test data of the problem itself which makes it pretty easy for someone to clone the problem. Not a big concern, but definitely we would like to see the view of the community regarding this.
The most of the times we have test cases in the problems and for each test case, the test data is mostly maximal test cases with a very few minimal test cases. Also, the order of the maximal and the minimal test cases are not from the minimal to maximal. So, it might happen that your submission failed on some large test cases and we show you that which might not be that helpful for debugging purposes.
These are one of the two main concerns, if you have some views regarding these, please feel free to share. We have this task in our mind and are thinking of some possible ways to resolve these.
I think not providing the test cases help us to improve our debugging skills and due to “no option” we are forced to apply different concepts and analyse our solution again and again which helps us to understand our implementation and the concept deeply.
But it is only helpful when we have “no option” and still we want to get it perfect so that we give it some more try , but what happened if we have “no option” at all ?? we have to move forward while skipping that problem which is not desirable for anyone.
At the same time what happened is,we get some unexpected verdicts due to wrong test input files or weak test cases which is not a fault of programmer in this case it is must to have the test cases so that we can report someone to look into the matter.
The core thing which i feel for any contest is that we have “no option” during the contest, all we have to do it by ourselves which is helpful for improvement but after contest we have editorials and many more options ,
I think we can do something similar to the testcases we can set a number “K” after “K” number of attempts that user is eligible to have test cases anytime after the contest.
@l_returns it is very much similar to share your code during contest and in that case we can’t do much,
so after contest you can choose if you are willing to do it by yourselves or you want testcase,
see we can not make it as perfect as it should be ,every funtionality have some bugs all we can reduce it,yes we can implement it with some modification so that these thing can be solved, and after contest user is on his own.
@nitish235 if some of the input files are having bug then it is impossible to pass 90% testcases in that case we will never get the testcases ,and at the same time it is very difficult to decide that how much % your code should get passed to be eligible for testcases.
This issue has been raised multiple times and it was always agreed that making test cases public will only reduce the efforts of user to solve the problem rather than increasing the skill to find the corner cases. After giving a lot of attempt on a problem without getting success due to some corner case, when the user sees the actual input causing WA, instead of solving for the general corner case, he usually handles that specific scenario and go ahead and often gets WA subsequently which does not solve the problem of helping user learn to find the error.
I was also not able to get WRKWAYS accepted just due to one case and I used one accepted solution to find the scenario. I wrote a test case generator and compared the output of accepted and my solution on that and could find the unhandled case in no time.
@admin@vijju123 If you are considering this I have a suggestion, how about introduce something like buying test cases using discuss karma (ofcourse after contests get over). Since discuss karma now don’t fetch you goodies, it would be good to introduce them as an exchange of test cases. Even if people start mining karma (though I doubt they would) It won’t do much harm in any case.
The basic idea is that for problems where you can easily create brute force solutions (which are guaranteed to work for small inputs) and want to debug your faster approach . You generate test cases and send it both these and compare the output.
I have personally used it to debug a lot of problems in long contests.
this is a question
Please somebody explain how to generate INPUT TEST CASES FILE(in.txt) and how this is different from custom inputs,and own generated simple test cases using loops and adjustments.
Yes hemant_dhanuka rightly said you stole my words… this is exactly what i want to convey to admin please please make test cases public after the contest is over…since sept17 when is started coding i can think about number of good problems which i lefted just because there was no way lefted to do them even after attempting them so hard… editorials helps a lot they give us a more or less same or different approach which makes us learn new things sometimes but this question remain unanswered “what is wrong with this approach…what is…” and asking this question on forums is silly since how can anybody give time to your code as much as you have given and you understands it better than the reader… there are some points about why test cases should be reavealed like russian website codeforces
(1). when somebody have tried a particular approach and have synchronised each part of code seperately and days have been spent on that.
(2). somebody may not have good friends(coders) around him in colleges so no source of help except website.
my request to good/experienced coders please advise me
While I think keeping the judging test cases confidential is appropriate, there is a case for having some more challenging small test cases (if applicable to the problem) in editorials, or perhaps even directly in the practice version of the problem. Often the sample test cases given don’t do much more than test input and output formats.
I also like the idea of reporting test case results as happens in the %age pass problems - it’s a little frustrating to “go back” to a one-state report after problems where you get a table of outputs. Some kind of indication of the scale of the test case might make this even more useful.
Yaa really this would help alot in many ways like it would save our time, lessen the questions posted on discuss, would make us aware of different type of corner cases and more. and it would be after the contest is over, so there will be no problem I too request @admin to add this feature
@vijju123 No bro, i don’t have any tool. In “TWOFL” problem my all test cases were passed out less than 2.3 sec but 3 cases is not passing even in 8 sec… i am doubtfull that may be in my code have any infinite loop… so if i have test cases than i can checkout wheather i am geting ans in 10 min/100 min/…(it means TLE) or i am not getting answer after waiting for long than for sure any infinity loop is running