×

# Will CodeChef provide test cases

 46 2 It would be very good if CodeChef could provide a detailed set of test case for a given problem and at what particular test case did a particular code fail. This would be a really good initiative on your part to help people in improving the tiny small errors that are really-really hard to spot and are often committed and never spotted. asked 27 Apr '12, 17:14 2★anup ♦♦ 2.4k●27●39●44 accept rate: 21% 0★admin ♦♦ 19.8k●350●498●541 4 I agree with you, that learning is easier with test cases, unfortunately almost no contest page shows test cases, thre are 2 exceptions that I know TopCoder and CodeForces. (27 Apr '12, 19:31) 1 Hackerrank also (22 Oct '14, 13:28) 3 @admin we will highly appreciate it if you give us the test cases on which our code got WA for practice problem it will be a great help for all.thanks (08 Sep '16, 08:55)

 58 We do not release test data for various reasons. However, we firmly believe that giving away the test data is a spoiler. It kills the motivation to try that extra bit harder and kills the fun and the challenge of the unknown. We do not want our contests to take that short cut. We make all submissions visible as soon as the contest ends to let you learn from other people's submissions. We also upload editorials for each problem with detailed explanation, so that you can learn from them. We encourage you to go through the editorials at the end of the contest and ask your questions if you have, on the page itself. Your questions will be answered directly by our problem setting panel. However, we are planning to show judge information for each submission like the time taken for run each test case, at what test case did the submission fail, etc. in the foreseeable future. answered 27 Apr '12, 17:15 0★admin ♦♦ 19.8k●350●498●541 accept rate: 36% 40 Not revealing failing test cases during contests is justifiable, However illogical if i'm solving problems from problem banks . Spoiler? How? After repeated failing if i'm not able to figure out theres no learning its just time spent to waste. As for editorials,LOOK-i have a completely different algorithm of my own and i want to know here i went wrong if i do-THAT'S LEARNING."where you went wrong"-thats learning. Editorials are just a way to see the problem through somebody else's mind and follow their algorithm and techniques. I don't see it any different from copying others solutions. (13 Jul '13, 13:02) 11 BUT ATLEAST AT THE END OF THE CONTEST ,YOU CAN PROVIDE PROVIDE THE PARTICULAR TEST CASE WHERE A PARTICULAR CODE FAILS.THIS WILL HELP A LOT OF PROGRAMMER TO IDENTIFY THEIR MISTAKES INSTEAD OF LEARNING IT FROM EDITORIALS. (10 Jul '14, 22:31)
 23 Where is the motivation to try harder when it is not even revealed why particular code produces the wrong answer? If my code compiles on ten different compilers before I submit, figuring in every possible test case on a simple solution, and displaying the exact output specified and taking the exact input specified, but I get a wrong answer with your tester - I have a feeling this situation requires modifying code to figure out how your site even WORKS over and over and over again, with no idea of where to go next because no frame of reference is provided. answered 07 Jun '12, 10:33 0★bhampton 356●1●2●2 accept rate: 0% 4 @bhampton: There is a frame of reference. We reveal all the solutions of all the problems after the contest and the problems are also moved into the practice section for the users to try at leisure. And you can see other's solutions too. Check this: http://www.codechef.com/submissions. Revealing test data is a spoiler and short cut to correcting your solution. Its the pursuit of finding the unknown that makes it exciting. (12 Sep '12, 22:52) admin ♦♦0★ 2 If revealing test data is a spoiler then certainly revealing hundreds of examples of correct code is a spoiler! It's so frustrating to as few as one input example from the problem definition. What is one to do when one's code seems correct but a simple "Wrong Answer" message is returned? Google Code Jam gives you more test data for the "small" version of each problem. At least you get to try your code with some data. This is really a dealbreaker for me. I like the CodeChef site and the amount of problems available, but it's just too frustrating to get such small input sets. I'm moving on. (13 Nov '12, 12:05) bergonom2★
 12 I remember, in my childhood I used to solve math problems but when I used to get stuck on a problem I tend to look at the answer/hint and then solve again removing that mistake. My father used to tell me, "Son, this is a wrong way of solving problems. You must think a lot of times before getting the actual answer. Think over and over again until you get the right answer. Dig every corner of your mind. Then it will help you a lot." I remember his words, and it really helped. I do not have to say anything more for this topic, but I know that this is a good feature of NOT providing the test cases. Disclaimer: The author of this post has put his personal opinion about his thinking on the topic. And people might still hate it or dislike it, for which author would not argue over the same. answered 12 May '13, 13:01 8.7k●19●48●98 accept rate: 9%
 6 Maybe there's a way our experiences can help you help us :) For example, in Serbia, binaries are tested completely different. There's always 10 test cases, but each test case contains one set of input data. So, that way you get 10 points for each test case, and the max you can get is 100... And I still can't see why we can't have test cases for the tasks that are not in Compete section, that are in Practice section... :D answered 30 Apr '12, 01:32 2★pera93 171●6●7●11 accept rate: 9% 1 We can also have partial scoring test data on CodeChef. The online judge has the capability. But that does not yet convince us to reveal test data. Ad mentioned before, even in the practice section, we believe that revealing test data is a spoiler. (12 Sep '12, 22:54) admin ♦♦0★ Even if we dont get partial scoring, providing just the detail like what was the status for each test file would be great help. It gives a hint if we are going totally wrong or somewhat in right direction. (13 Sep '12, 09:25)
 5 I have to say that although it might seem frustrating during a live contest to see WA or TLE and being totally "blind", it is also the ONLY way to help contestants to improve their skills and I speak from experience, as one time during a Codeforces problem, I was able to immediately see a pattern by looking at a test case where I was getting WA, which revealed the whole problem to me... It can seem unfair, but trying harder, reading tutorials on a particular data structure or implementation idea along with the editorials/accepted codes once the contest ends, it's the only true way of improving ;) answered 13 Sep '12, 07:05 3★kuruma 17.7k●72●143●209 accept rate: 8%
 4 Another useful idea for me is to writing in which test-case we have the problem: e.g. TLE in test-case 8. This will let us know how close we are in the correct answer! answered 12 Sep '12, 23:19 60●2●2 accept rate: 0% yea..this system is followed in codeforces (12 May '13, 12:55)
 3 No, providing the test cases restricts our thinking as in which condition our code will fail. If you are really in a need of test cases generate it yourself. Write a script which will generate random test cases for your program and test your code and figure it yourself what should be the result of those cases. This method will really help you a lot, also brainstorming for generating your own test cases will help you to develop a better understanding of failure situations. Also remember usually our codes fails on edge cases so remember to run your code on randomly generated edge cases to test the result. answered 23 Oct '14, 16:05 1.9k●1●12●43 accept rate: 14%
 3 Guys please provide the test cases it is very important to know where the code is failing..The thing about coding is that we learn about the mistakes we make and correct ourselves.Without knowing the test cases everyone is bound to make a mistake.The novice programmers don't get a chance to correct themselves and make lots of mistakes in the future it is my sincere request that you provide the test cases where the code is failing at least in the practice section of the web site.That will make things much easier. answered 13 Jul '15, 00:18 0★codeius 21 accept rate: 0%
 2 The site administrator is a dumb person. For 4 years people are telling but he doesn't do anything. I think he doesn't want to change anything good in his (stable) website. He doesn't want to introduce any new thing and he doesn't need to change because codechef is already an established site. answered 08 Sep '16, 01:18 11 accept rate: 0%
 2 @admin we will highly appreciate it if you give us the test cases on which our code got WA for practice problem it will be a great help for all.thanks answered 08 Sep '16, 04:56 238●9 accept rate: 8%
 1 The best solution to this is to provide the number of test cases out of total in which our code fails and the number of test cases in which our soln passes!!! So that if we get W.A , a person may think that his algorithm or approach is wrong but the truth may be far from it!! May be the logic fails in one or two test cases so that the person can work on finding the corner test cases!!! Just like how hackerearth does!! That indeed is a way of saving hours of frustation and wasting time to understand the editorials which are generally cubersome and hard to understand answered 11 Jul '14, 00:13 3★shivhack 31●1●3 accept rate: 0%
 0 Of course i agree that providing test vectors will give short cut to solution. But for practice problems it is better to provide test vectors. It will help in knowing the boundary conditions and exceptions that we miss during writing the code. we just wanted a preparatory standards to go for a challenge. Rather than blindly telling that your answer is wrong, it is always good to know which case i missed causing the issue. answered 12 May '13, 11:08 2★vkdev 1 accept rate: 0%
 0 Most of the time, we are not sure whether the problem has been correctly understood. One possible solution could be that we may provide with our test cases along with solutions to be checked whether they are correct or not. if this is not a spoiler then proper checks and balances would have to be put in place. If by chance there is a bug in the solver then this system can very easily point that out instead of relying on persons whose wrong submissions have been accepted. answered 12 Jun '14, 13:20 1 accept rate: 0%
 0 I don't understand this reason! Just think of the situation when you have 150-200 or perhaps even bigger lines of code in your programme and you expect to sit for days to find a corner case! :( Then why don't Topcoder cover this so called "precious data". If Codeforces and Topcoder can give the test cases then why don't Codechef also give! :( It is time to change this rule!! answered 23 Oct '14, 16:49 3★bipin2 3.1k●25●46●71 accept rate: 8%
 0 i agree with nsghumman, if i have complete different algorithm then looking at someones's code and editorial doesn't help and after the contest is done there is no harm in revealing failed test cases. answered 13 May '15, 11:42 1 accept rate: 0%
 0 I am really glad to see that codechef doesn't reveal the hidden test case even in practice session. Definitely it is right that it will kill the curiosity of debugging your code more and more and make to generate random test cases again and again. Other sites provide test cases like hackerearth, hackerrank etc, but these one makes you dumb and doesn't make you think more enough like in codechef! I still remember the time when i wasted the whole day for finding the one corner test case in which my code was failing!... but at that time i really enjoyed very well! answered 20 Oct '16, 10:33 2.8k●1●4●19 accept rate: 16%
 0 I joined this site today looking forward to trying the problems, I find it deeply disappointing the totally inadequate attention paid to providing test cases. I have no interest in carefully generating masses of my own test data, hardly the point of this site, nor I'm interested in playing guess the bug. Having implemented many encryption algorithms myself the idea of doing this without proper test cases is laughable. I won't be attempting any more problems here until this issue is addressed. answered 10 Feb '17, 19:30 0★grunch 1 accept rate: 0%
 0 @grunch Well, you must appreciate that every site has its own method and approach. Codechef's is not providing the exact test cases, but it does provide every solution. You may not appreciate it now, but guessing the bug yourself is very crucial in becoming a successful coder as you can give your code a new shade of accuracy with these skills. Hope I put across my point clearly :) answered 10 Feb '17, 19:55 15.5k●1●20●66 accept rate: 18%
 0 Below is my code for this problem import java.io.BufferedReader; import java.io.InputStreamReader; import java.io.PrintWriter; public class SignLanguage { public static void main(String[] args) throws Exception { InputStreamReader isr = new InputStreamReader(System.in); BufferedReader br = new BufferedReader(isr); PrintWriter pw = new PrintWriter(System.out); int totalNumbers = Integer.parseInt(br.readLine()); int number; String s; int i; while(totalNumbers-- > 0) { number = Integer.parseInt(br.readLine()); s = br.readLine(); char[] c = s.toCharArray(); for (i = 0; i < number; i++) { if(c[i] == 'Y' || c[i] == 'I') break; if(c[number - 1] == 'N') break; } if(c[i] == 'Y') { pw.println("NOT INDIAN"); } else if(c[i] == 'I') { pw.println("INDIAN"); } else { pw.println("NOT SURE"); } } pw.flush(); } }  This code works perfectly for the sample inputs given on the problem page but while executing it on the code chef Total Score as 0.00%. There is no way to find for which testcase my code is failing as when tried with the sample testcase on the problem page it works perfectly fine. Please advise what to do in such scenario and how to find where my code is going wrong. answered 07 Jan '18, 20:23 1★krrishy 11●2 accept rate: 0% 15.5k●1●20●66 There is no way to find for which testcase my code is failing as when tried with the sample testcase on the problem page it works perfectly fine. Ummm....make your own custom test cases? C'mon, spoonfeeding to that extent is harmful. (07 Jan '18, 21:39) 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. (07 Jan '18, 23:07) krrishy1★ 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. (08 Jan '18, 00:48) Thank You :) (08 Jan '18, 22:21) krrishy1★
 0 @vipin16 bro I think codechef people are doing good by hiding test cases. It forces us to think about spoiler cases. If you want to learn by analysing the failed test cases better to practice on hackerrank and don't say good bye to codechef just feel the signature taste of codechef. answered 08 Jan '18, 22:48 11●2 accept rate: 0%
 0 plz tell me whats wrong with my code : https://www.codechef.com/viewsolution/17394683 I made solution according to problem ,it works for testcase displayed,but still wrong answered 11 Feb '18, 00:14 3★ayush4 16●3 accept rate: 10%
 -3 Bye bye codechef :-( answered 20 Oct '14, 12:57 2★vipin16 9 accept rate: 0%
 toggle preview community wiki:
Preview

By Email:

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• image?![alt text](/path/img.jpg "title")
• numbered list: 1. Foo 2. Bar
• to add a line break simply add two spaces to where you would like the new line to be.
• basic HTML tags are also supported
• mathemetical formulas in Latex between \$ symbol

Question tags:

×2,738
×365
×214

question asked: 27 Apr '12, 17:14

question was seen: 32,336 times

last updated: 11 Feb '18, 00:14