725973's blog

By 725973, 6 weeks ago, In English

I tried to rewrite my C++17 (64) solution for 213. Strong Defence in Rust. After some time of debugging (it kept failing test 11), I just resubmitted the accepted solution code choosing GNU C++20 (64) as a compiler. The submission failed on test 11. This means the same code in C++17 behaves differently when being submitted as a C++20 code.

32-bit C++17 solution was accepted too. Since I have experienced the same issue with the Rust solution (but the Python solution was accepted), I suspect this might be a toolchain issue.

UPD: Turns out (thanks to nor) these submissions are not publicly available. I have posted the codes in the comment section: https://codeforces.com/blog/entry/96256?#comment-853275.

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

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

Seems Like Very Strange Thing Happened.

»
6 weeks ago, # |
  Vote: I like it +21 Vote: I do not like it

Although it seems like I can't view the submission (since it's from the acmsguru problemset), I'm fairly confident that the issue arises out of having undefined behaviour in the code. I would recommend making the solution publicly available to check if this is the case.

  • »
    »
    6 weeks ago, # ^ |
    Rev. 2   Vote: I like it 0 Vote: I do not like it

    Sorry, I didn't know that these submissions are not publicly available. Here they are:

    C++
    Rust
    Python

    As you can see, I do not rely on undefined behavior anywhere.