Quantcast
Channel: CodeChef Discuss - latest questions
Viewing all articles
Browse latest Browse all 39796

Test locally

$
0
0

How do I test my program on local machine with a provided input file. Many contest (like Google CodeJam) provide a input file and you have to submit the output file as well as the source code. So, please tell me how to produce the output file. I tried it by adding this --
#ifndef ONLINE_JUDGE
freopen("input.txt","r",stdin);
freopen("output.txt","w",stdout);
#endif
But when i build and run the program it terminates and doesn't writes completely the output of all the input in the input file. (it just wrote 3 output instead of expected 100 in Problem A of google Codejam Practice...!)
thank you.


Viewing all articles
Browse latest Browse all 39796

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>