Блог пользователя IamFromMars

Автор IamFromMars, история, 9 лет назад, По-английски

I am doing a gym contest and I the problem says ( Input File: A.in ) & ( Output File: standard output ) and whenever I submit I got WA what I must do.

Thanks In Advance :)

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
9 лет назад, скрыть # |
 
Проголосовать: нравится +8 Проголосовать: не нравится

Good day to you,

well you have to read the problem from file "A.in" and output is same as you are used to it.

Every language have different way how to do it, in C++, one can write following lines at the very beginning of your programm:

freopen("A.in","r",stdin);

In case you will meet similar thing with output, you can use similar piece of code.

freopen("A.out","w",stdout);

These lines "transfer" stdin/stdout from standard input to "A.in". (So they must be used before the first usage of scanf)

Anyway note that those lines will obviously help you only in case your WA's were caused by the input ^_^

Good Luck & Have Nice Day!