When my solution fails on a larger testcase, I can only see the first few lines of the testcase and have to submit again and again to find out what's going wrong with my code. I think it would be much easier to debug if I can download the testdata. In this way I can test my solution locally.
I'm not sure if here is the right place to ask, but is there any way to download the testdata of the problems?
Idk why this has so many down votes. It's a good question, a feature that would be super nice, and you have an undertale-themed name; what's not to like?
The short answer is: no, unfortunately there isn't. Or not to my knowledge at least.
Thank you for your reply. I know it is available in many other OJs and I thought it's also true for codeforces =(
Atcoder has a button to download the testdata
I could not find it at Atcoder. Could you please suggest where is this option?? Thanks
You can download from here
Commenting for better reach since this is a much needed question. Hope you get what you were looking for.
Hey! There is one method but sometimes it's very tedious.
Analyze the test case. And find some things that are not in the previous test cases.
Sometimes it happens that there are many tests in one test case. In that case, you can check for the test case number and print the input.
No, but there should be. I really cannot think of a reason to justify making a test case data partially accessible. When it is not hidden, it should be completely visible.
I can: if you have the complete test data, it's easy to steal problems: writing a checker is usually trivial.
But is that really the reason why test cases are hidden?
I don't know for sure of course, you'd have to ask Mike, but Codeforces has at least at one point cared about that, so it's not a completely unreasonable assumption.
Of course it could just be that it is hard to implement for some reason.
well downloading the big test cases is like making a big test case, because if you download it, how do you want to debug it!? so if you want to find a test case and debug your solution, you can write another program which you are completely sure that is working (even if its complexity is too bad) then make a big test case(you can use random) and then check your solution with the other one. then you can find a smaller test which your program is giving WA. it works most of the time.
Normally this is what I do, but sometimes it is hard to generate strong tests. If I can download the testcase I can test my solution easily instead of submitting over and over again, waiting for the verdict
It is appalling that many high-rated coders don't know how to debug a program on a large test case.
Hint: debugging has nothing to do with "Debug" button in your IDE.
Having a feature like CSES would be nice. You can press the eye and the whole test would pop up.
It would be very useful to have this feature.
Although some people say it's impossible to debug the program with an array of
N=10,000
elements, I still find it useful, and I can provide an example.Recently, I have struggled with the problem which assumes a lot of
if-branches
in the solution. The structure of my solution was like this:When I checked out my submission status, I could see that my program returned
NO
when there should beYES
.Of course, I wouldn't analyze the entire test case of size
10,000
, but at least I could find out what branch led toNO
answer.To that end, I had to manually extract the test case. I did 20 submissions in order to print the input data and concatenate it afterwards.
Once I merged everything, I was able to run the test and find out the wrong branch. It was extremely helpful.
I wish codeforces had an opportunity to download tests in order to avoid "manual extraction and concatenation" of test data through 20+ submissions.