I seriously want to set problems for codechef . However I don’t know how to generate such big test cases which appear in problems and also the corner cases . Is there a method/tool for it ? The test cases I generate are not upto the mark of the quality here .
They write code to generate larger test cases. For corner cases, you need to know the problem in detail, and various possible wrong/brute-force approaches. Then, for each approach, you make a special case to fail it. Problem setting and testing takes a LOT of time. Its not something done in 1-2 days.
For generating test cases you need to use random function! Check out this, @likecs posted his test generator programs. You can probably learn a lot from them if you are new to these things(as me :p) .
P.S.: You have to figure out corner test cases yourself though!
when u set a problem , its the same as solving , just when you solve a problem , you think of cases where the solution can possibly fail, same is done while setting a problem , those are the test cases where people’s code can fail .
and for bigger test cases just use rand() function, this will help .
but for cases where you expect a user to fail , think as a problem solver for solving it , then only you can think of the test cases where others can also fail.