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

Автор Shuvo_06, история, 18 часов назад, По-английски

For constructive problems like Skibidus and Rizz , where you need to identify a general pattern that works for all cases, I’d like to know how you approach such problems and what your thought process is.

is it just experience from practice or something else?

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

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

I used to think they required some sort of strong math/logic understanding or proof writing. Now I'm convinced you just have to try random shit until it works and not worry about proving it. I think all the solutions to all the constructive problems rated under 1700 that I've practiced can be found by either writing a brute force program then identifying the pattern or by guessing something and submitting it if you can't find a counter-example.

For the problem you linked, I surprised myself came up with the idea in like 10 minutes. I was just like "Oh we need the max balance value to be exactly k, so let's just make a block of size k then try to minimize the balance value after that" then I was like "okay how to minimize the balance value? just alternate 0s and 1s?" and it worked.

  • »
    »
    4 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    so, it's kinda luck based? (:

  • »
    »
    2 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    guessforces became expertforces

  • »
    »
    2 часа назад, # ^ |
      Проголосовать: нравится 0 Проголосовать: не нравится

    i think of same but gave wrong answer how?

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

I read the problem and my immediate reaction was we need alternating sequence. I think you just need experience.