4

In programming contests like Google CodeJam, Facebook Hacker Cup, each question is provided with an input file for testing one's code for that program. I get struck at this point only.

I don't understand whether that input file should be read by my program or it is just for testing the correctness of my program for various test cases given in that input file and I can copy past each test case given in the input file one by one manually and see whether the output provided by my program is right or wrong.

It would be very helpful for me if anyone who has been actively participating in such competitive contests can share their views.

  • 2
    I didn't try any code contest in your list but usually the data file is feed in by command line piping or redirection and scanf (C/C++) is enough to handle the input. – Codism Jan 9 '13 at 16:30
9

You need to write code to read that file. When you submit your program, it will be tested against other unpublished data files in the same format.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.