Can somebody help me to find why this code gives WA: PON It's just a classical problem with a classical solution that should work fine...
Edit: Problem solved
# | User | Rating |
---|---|---|
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 |
# | User | Contrib. |
---|---|---|
1 | cry | 166 |
2 | maomao90 | 163 |
2 | Um_nik | 163 |
4 | atcoder_official | 161 |
5 | adamant | 160 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | nor | 153 |
9 | Dominater069 | 153 |
Can somebody help me to find why this code gives WA: PON It's just a classical problem with a classical solution that should work fine...
Edit: Problem solved
Name |
---|
It is better to use streams (cin) for reading, scanf implementations are not consistent across different OS, compilers, OJ ... is a mess.
I have tried that, but it didn't work as well, so, can anybody spot another possible mistake?
I have sent your code using cin (without using scanf) and got AC
sorry, and yeah, I got AC too, I don't know what happened last time, but I was sure I sent it that way...
For scanf() and printf() you have to add cstdlib library. Try to send your code with cstdlib library.