233L's blog

By 233L, history, 2 weeks ago, In English

https://codeforces.com/gym/104053/submission/261286499

https://codeforces.com/gym/104053/submission/261286566

Two submissions with the same code got different results.

The first submission used c++20 and got RE.

The second used c++17 and got AC.

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

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

Auto comment: topic has been updated by 233L (previous revision, new revision, compare).

»
2 weeks ago, # |
  Vote: I like it +14 Vote: I do not like it
Diagnostics detected issues [cpp.clang++-c++20-diagnose]: p71.cpp:67:34: runtime error: passing zero to clz(), which is not a valid argument
SUMMARY: UndefinedBehaviorSanitizer: undefined-behavior p71.cpp:67:34 in