Kei.One's blog

By Kei.One, 9 years ago, In English

Hello I have a little problem with usaco. i'm new there and i want to see if my solution is right or not but i don't know how to use the tesdata files that is in there i would appreciate if somebody could tell me how to use it.

  • Vote: I like it
  • +2
  • Vote: I do not like it

»
9 years ago, # |
Rev. 2   Vote: I like it 0 Vote: I do not like it

First of all you have to open the input file for reading, writing and for c++ the opening file code is:

freopen("input.in", "r", stdin);
freopen("output.out", "w", stdout);

For each question there is the input and output file name in which you should paste it in the code and In order to send a code for online-training pages You gotta add header to your code which is like this:

/*
ID: your_id_here
PROG: problem_name
LANG: C++
*/
»
9 years ago, # |
  Vote: I like it 0 Vote: I do not like it