AC: https://codeforces.me/contest/1406/submission/92644945 WA :https://codeforces.me/contest/1406/submission/92645375 why WA ?? LONG_MIN < the value in code??
# | User | Rating |
---|---|---|
1 | tourist | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
AC: https://codeforces.me/contest/1406/submission/92644945 WA :https://codeforces.me/contest/1406/submission/92645375 why WA ?? LONG_MIN < the value in code??
Name |
---|
If you submit in C++17, not C++17(64 bit, msys 2) then your solution is compiled and run in 32bit environment where long is 32-bit type and LONG_MIN = -2147483648
getting same error on C++17(64bit) WA:https://codeforces.me/contest/1406/submission/92664218
Use LLONG_MIN Here is your Accepted code (modified)
Can you please explain why it fails ??
long longl is always 64 bit, but long depends on the computer that the program is running. In this case, long was 32 bit, so you got WA.
You should have get accepted when you submitted in 64 bit. But may be it's an internal problem of codeforces. So it is better to use
LLONG_MIN
instade ofLONG_MIN