I've never hacked a solution before. Could someone leave a link to learn how to hack? About the title In general. I mean how to generate counter-examples? what is the best way?
# | User | Rating |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3831 |
3 | Radewoosh | 3646 |
4 | jqdai0815 | 3620 |
4 | Benq | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | gamegame | 3386 |
10 | ksun48 | 3373 |
# | User | Contrib. |
---|---|---|
1 | cry | 164 |
1 | maomao90 | 164 |
3 | Um_nik | 163 |
4 | atcoder_official | 160 |
5 | -is-this-fft- | 158 |
6 | awoo | 157 |
7 | adamant | 156 |
8 | TheScrasse | 154 |
8 | nor | 154 |
10 | Dominater069 | 153 |
I've never hacked a solution before. Could someone leave a link to learn how to hack? About the title In general. I mean how to generate counter-examples? what is the best way?
Name |
---|
Belive me,how to hack and all about hack,it's not improtant,it's better to learn some good algorithm and do 5-10 hard problem and your status "newbee" will be broken!!!
Think of any conceptual bugs you had while solving the problem and eventually worked out, and look for solutions with those bugs. Besides that, if you see a solution that's different from yours, try to prove its correctness, not necessarily formally, and if it's wrong there's a good chance a breaking case will emerge from this process.
Just to add to mkirsche's awesome answer,
One thing I notice for some people in Div.2 is that, they sometimes use STLs without considering the implicit complexities. For instance, strlen, string::find(), std::reverse .. etc. these do not work under O(1).
When you spot overly extensive use of STLs, there's a chance that they might fail under large test cases.
I think that you should learn how to solve problems right now, not how to hack solutions.