Drunk G++ : Runtime Error locally but AC on CF

Revision en2, by yeetholmes619, 2024-11-12 21:30:12

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 : 291228049 and ran it against any test case of the problem 1398D - Colored Rectangles, I got the following :

Runtime Error

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!

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en2 English yeetholmes619 2024-11-12 21:30:12 416
en1 English yeetholmes619 2024-11-12 20:54:15 1018 Initial revision (published)