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 | 3882 |
2 | maroonrk | 3539 |
3 | Benq | 3513 |
4 | MiracleFaFa | 3466 |
5 | ksun48 | 3462 |
6 | ecnerwala | 3446 |
7 | slime | 3428 |
8 | Um_nik | 3426 |
9 | jiangly | 3401 |
10 | greenheadstrange | 3393 |
# | User | Contrib. |
---|---|---|
1 | awoo | 192 |
2 | -is-this-fft- | 191 |
3 | Monogon | 184 |
4 | YouKn0wWho | 182 |
4 | Um_nik | 182 |
6 | antontrygubO_o | 171 |
7 | maroonrk | 169 |
8 | kostka | 165 |
9 | SecondThread | 164 |
9 | errorgorn | 164 |
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.