I tried to run this code on my machine and is giving correct answer for the 21st test case. Please check why its giving wrong answer on codeforces compiler.
# | User | Rating |
---|---|---|
1 | jiangly | 3898 |
2 | tourist | 3840 |
3 | orzdevinwang | 3706 |
4 | ksun48 | 3691 |
5 | jqdai0815 | 3682 |
6 | ecnerwala | 3525 |
7 | gamegame | 3477 |
8 | Benq | 3468 |
9 | Ormlis | 3381 |
10 | maroonrk | 3379 |
# | User | Contrib. |
---|---|---|
1 | cry | 168 |
2 | -is-this-fft- | 165 |
3 | Dominater069 | 161 |
4 | atcoder_official | 160 |
5 | Um_nik | 159 |
6 | djm03178 | 157 |
7 | adamant | 153 |
8 | luogu_official | 151 |
9 | awoo | 149 |
10 | TheScrasse | 146 |
Name |
---|
8603498 u need use long long , sorry for duplicate ur code :D
It happened to me too(I havent seen you code, but talking generally).. Sometimes my IDE (Dev C++ 5.7.1) on my laptop gives different output for test cases than the codeforces compiler!! I thought it might be because of the use of different version of compiler by Codeforces!! I dont know!! Can anyone answer this please??
You program probably does something that's undefined behaviour or compiler-depdendent. You can also look this page to reassure yourself that compiler you're using has the same flags with Codeforces's compiler.
My bad. I got it. x will overflow. Thanks :)
Do not use
long
. It's machine-dependent. It's 64-bit on x86-64 but 32-bit on x86. Codeforces Judge is x86.