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?
№ | Пользователь | Рейтинг |
---|---|---|
1 | tourist | 4009 |
2 | jiangly | 3823 |
3 | Benq | 3738 |
4 | Radewoosh | 3633 |
5 | jqdai0815 | 3620 |
6 | orzdevinwang | 3529 |
7 | ecnerwala | 3446 |
8 | Um_nik | 3396 |
9 | ksun48 | 3390 |
10 | gamegame | 3386 |
Страны | Города | Организации | Всё → |
№ | Пользователь | Вклад |
---|---|---|
1 | cry | 167 |
2 | Um_nik | 163 |
3 | maomao90 | 162 |
3 | atcoder_official | 162 |
5 | adamant | 159 |
6 | -is-this-fft- | 158 |
7 | awoo | 157 |
8 | TheScrasse | 154 |
9 | Dominater069 | 153 |
9 | nor | 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?
Название |
---|
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.