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 :)
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 153 |
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 :)
Название |
---|
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:
In case you will meet similar thing with output, you can use similar piece of code.
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!
( Output File: standard output )
So I think
freopen("A.out","w",stdout);
should not be needed.I totally agree, that is why there is following sentence above ^_^ : "In case you will meet similar thing with output, you can use similar piece of code."
And good day to you too! ^_^
I am trying to solve a problem which asks to change th input put used this way and i got WA in this Code what is the wrong
you should remove
freopen("I.in","r",stdin);
as they did not ask you to read from I.inThanks it is working for me :)