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 | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | nor | 152 |
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 :)