#pragma GCC optimize ("trapv") // kills the program on integer overflows (but is really slow).
This helps a lot in testing. If a solution fails on a particular test case this can help in finding the bug.
This works on my computer but does not work on Codeforces.
Is there an alternative to this on online judges?