title: Competitive Programming : Generating test cases and validating the program correctness
body: <p>I have been doing sport programming for a while and still improving day by day. But one thing I have always wondered is that it would be really nice if I could automate the test-case generation process and cross-validation of my program. Definitely it would be a brute force approach as some test cases would be algorithm specific.</p>
  
  <p>Doing a google search gives me a nice link on Quora : <a href="https://www.quora.com/How-do-programming-contest-problem-setters-make-test-cases" rel="nofollow noreferrer">How do programming contest problem setters make test cases ?</a> and the popular <a href="https://github.com/MikeMirzayanov/testlib" rel="nofollow noreferrer">testlib</a> used by problem setters.</p>
  
  <p>But isn't this a chicken-egg problem?</p>
  
  <p>Assume I generated 1 million input test cases, but what would I check them against? How will I generate the outputs? Because I am still in the process of validating the program... If my script generates the correct outputs as well, then whats the point of writing the program in the first place. I can submit the script itself. Also, its not possible to write 1 million outputs for generated test cases manually. Can anyone please clarify this confusion.</p>
  
  <p>I hope i have clarified the problem correctly.</p>