### gilcu3's blog

By gilcu3, 9 years ago,

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


• -12

 » 9 years ago, # |   0 It is better to use streams (cin) for reading, scanf implementations are not consistent across different OS, compilers, OJ ... is a mess.
•  » » 9 years ago, # ^ |   0 I have tried that, but it didn't work as well, so, can anybody spot another possible mistake?
•  » » » 9 years ago, # ^ |   +1 I have sent your code using cin (without using scanf) and got AC
•  » » » » 9 years ago, # ^ |   0 sorry, and yeah, I got AC too, I don't know what happened last time, but I was sure I sent it that way...
 » 9 years ago, # | ← Rev. 3 →   +9 For scanf() and printf() you have to add cstdlib library. Try to send your code with cstdlib library.