Roman1's blog

By Roman1, history, 7 years ago, translation, In English

Hi,

In the http://codeforces.net/contest/977 contest, there is substantial amount of solutions with errors like out-of-array-bounds or uninitialized memory reads. Many of them are accepted, as the errors don't lead to failure: layout of variables is "lucky enough".

Many of the solutions are currently marked as accepted. So, it is possible to try "hacking" them, i.e. to build a test case, which would reveal solution incorrectness.

In "custom test" mode (http://codeforces.net/contest/977/customtest), if compiler is in Diagnostics (DrMemory) mode, the errors are detected.

Question — how to "hack" solution in DrMemory mode, so that memory errors are detected in "hack" mode as they are currently detected in "custom test" mode?

Full text and comments »

  • Vote: I like it
  • -20
  • Vote: I do not like it