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 :)
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
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 :)
Name |
---|
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 :)