The purpose of hacking is to improve the CSES test data by showing that an accepted code doesn't work in some cases. After an admin has checked the hacking input, it may be added to the test data.

Here are some guidelines for hacking:

  • Try to send hacking inputs that would be useful in the CSES test data and can potentially break several codes.
  • If the code has a logical error, try to send a small input that shows why the code doesn't work.
  • If the code is too slow, try to send a maximum size input that can break as many codes as possible.
  • In string problems, don't send hacking inputs that break hashing-based codes with some constants. It is not reasonable to add inputs with many possible constant combinations to the test data.
  • If a code contains hard-coded answers to test inputs, you can also hack it. The input won't be added to the test data but the code will be marked skipped.