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 | 3993 |
2 | jiangly | 3743 |
3 | orzdevinwang | 3707 |
4 | Radewoosh | 3627 |
5 | jqdai0815 | 3620 |
6 | Benq | 3564 |
7 | Kevin114514 | 3443 |
8 | ksun48 | 3434 |
9 | Rewinding | 3397 |
10 | Um_nik | 3396 |
# | User | Contrib. |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 155 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
10 | djm03178 | 152 |
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.