It seems that
assert statements are compiled when I submit a solution to a problem, which hurts the runtime in case complex assertions are used. I would prefer if the assertions were enabled when I "Run Code" but disabled when I "Submit Solution".
Assertions can be disabled by defining the macro
NDEBUG before including
As a workaround, I redefine the assert macro in the beginning of my code when I want to disable the assertions:
#undef assert #define assert(x)