Codeforces and Polygon may be unavailable from December 6, 19:00 (UTC) to December 6, 21:00 (UTC) due to technical maintenance. ×

MKasirloo's blog

By MKasirloo, history, 2 months ago, In English

The same code on different versions of C++, but only C++17 gets AC. Old but Gold!

  • Vote: I like it
  • +13
  • Vote: I do not like it

»
2 months ago, # |
  Vote: I like it +15 Vote: I do not like it

fun fact: CNOI is still using C++14 as a standard.

»
2 months ago, # |
  Vote: I like it 0 Vote: I do not like it

C++11 also old But Gold!

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

C++17 32bit is faster for int operations, and C++20 64bit is faster for long long operations.

Try long long and resubmit using 64bit ++20;

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

Probably you just got lucky, test 4 took the longest time.

»
2 months ago, # |
  Vote: I like it +1 Vote: I do not like it

well, yeh. but these are edge cases. like in that ONE problem u like that thing that's only in c++ 20. also c++20 is faster for long longs. but its rly just prefrence