Блог пользователя Chasty

Автор Chasty, история, 9 лет назад, По-английски

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?

  • Проголосовать: нравится
  • -17
  • Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +41 Проголосовать: не нравится

»
9 лет назад, # |
  Проголосовать: нравится +2 Проголосовать: не нравится

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!!!

»
9 лет назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

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.

»
9 лет назад, # |
Rev. 3   Проголосовать: нравится 0 Проголосовать: не нравится

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.

»
9 лет назад, # |
  Проголосовать: нравится +15 Проголосовать: не нравится

I think that you should learn how to solve problems right now, not how to hack solutions.