AC: https://mirror.codeforces.com/contest/1406/submission/92644945 WA :https://mirror.codeforces.com/contest/1406/submission/92645375 why WA ?? LONG_MIN < the value in code??
# | User | Rating |
---|---|---|
1 | tourist | 3985 |
2 | jiangly | 3814 |
3 | jqdai0815 | 3682 |
4 | Benq | 3529 |
5 | orzdevinwang | 3526 |
6 | ksun48 | 3517 |
7 | Radewoosh | 3410 |
8 | hos.lyric | 3399 |
9 | ecnerwala | 3392 |
9 | Um_nik | 3392 |
# | User | Contrib. |
---|---|---|
1 | cry | 169 |
2 | maomao90 | 162 |
2 | Um_nik | 162 |
4 | atcoder_official | 161 |
5 | djm03178 | 158 |
6 | -is-this-fft- | 157 |
7 | adamant | 155 |
8 | awoo | 154 |
8 | Dominater069 | 154 |
10 | luogu_official | 150 |
AC: https://mirror.codeforces.com/contest/1406/submission/92644945 WA :https://mirror.codeforces.com/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://mirror.codeforces.com/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