Countermeasures Know-how
-
In the case of WA (Wrong Answer):
- Simply try hard to find corner cases.
- There may be a possibility of overflow if using int, so use ll instead.
- Be careful because there may be patterns where it seems int is enough at first glance, but upon further consideration, it turns out to be a loop.
- The input may be supposed to be gll, but it might be gi instead.
- Mistake in the output format:
- There may be patterns where instead of outputting 2, it multiplies by double and outputs 2.0 (this can lead to partial AC, which is scary).
- There may be a possibility that the output of ll is in abbreviated form like 5e+11.
-
In the case of TLE (Time Limit Exceeded):
- There may be a possibility that # define _GLIBCXX_DEBUG is causing trouble.
- It may simply exceed the time complexity.
- The unexpected operations on containers may be consuming computation time.
- If there is a huge amount of input, the content of gi being get
may have an impact.
-
If you are stuck on a green difficulty problem, try looking at this:
-
For graph-related problems, it may be easier to visualize with this: