Hey I think I'm using my mac's clang llvm compiler to compile my code with the following flags : ↵
↵
```↵
g++ -std=c++20 -DDEBUG -DYEET -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment $filename -o ${filename%.*}↵
```↵
↵
and when I compiled the following code : [submission:291228049]↵
and ran it against any test case of the problem [problem:1398D],↵
I got the following : ↵
↵
<spoiler summary="Runtime Error">↵
↵
</spoiler>↵
↵
But as you can check out, the submission was accepted on Codeforces, which confuses me. How do I begin to understand what's going on?↵
↵
Thanks for your help and let me know if you need any more information↵
↵
Edit 1 : ↵
I tried to run with just the address sanitizer flag, and I still got a runtime error. Then I decided to remove all the sanitizers and I still got the error so I thought the "-DDEBUG" flag was the culprit and I was right :")↵
↵
`debug(dp)` which was a 3-D std::array gave the error.↵
↵
I'm still not sure why, but at least it's not a compiler issue, which would've been harder to debug, lol!↵
↵
Thanks!
↵
```↵
g++ -std=c++20 -DDEBUG -DYEET -fsanitize=address -fsanitize=undefined -fno-sanitize-recover=all -fsanitize=float-divide-by-zero -fsanitize=float-cast-overflow -fno-sanitize=null -fno-sanitize=alignment $filename -o ${filename%.*}↵
```↵
↵
and when I compiled the following code : [submission:291228049]↵
and ran it against any test case of the problem [problem:1398D],↵
I got the following : ↵
↵
<spoiler summary="Runtime Error">↵
↵
</spoiler>↵
↵
But as you can check out, the submission was accepted on Codeforces, which confuses me. How do I begin to understand what's going on?↵
↵
Thanks for your help and let me know if you need any more information↵
↵
Edit 1 : ↵
I tried to run with just the address sanitizer flag, and I still got a runtime error. Then I decided to remove all the sanitizers and I still got the error so I thought the "-DDEBUG" flag was the culprit and I was right :")↵
↵
`debug(dp)` which was a 3-D std::array gave the error.↵
↵
I'm still not sure why, but at least it's not a compiler issue, which would've been harder to debug, lol!↵
↵
Thanks!