Any general ideas on how to debug RUNTIME_ERROR on huge inputs in the systests? Here's my submission: https://codeforces.net/contest/1092/submission/47535638
- I cannot copy the full input (it is truncated with "...") for local testing with gdb
- I tried compiling with execinfo.h to use a stack backtrace handler, but that doesn't compile (no surprise)
My code gives RUNTIME_ERROR on test #7 and both times it says memory used is exactly 10000KB, but the memory limit is 256MB. It does seems odd that the crash would come at that exact point of memory (and both times).
Thanks for any tips on what I'm doing wrong. Not asking for algorithm help, as I have read the editorial. Just trying to implement.
i recommend just doing random test. Your program seems to crash on this examples: