I heard many top-guys say that when their solutions get WA for reasons they can't find, they usually generate tests and compare the output on a bruteforce solution with the output on their fast solution. Do you have a script to do that, or each time you generate test and try it on both solution? Could you elaborate on when and how you do it?