Shuvo_06's blog

By Shuvo_06, history, 5 weeks ago, In English

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?

  • Vote: I like it
  • -3
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    so, it's kinda luck based? (:

    • »
      »
      »
      5 weeks ago, # ^ |
        Vote: I like it +1 Vote: I do not like it

      I don’t wanna call it luck since that implies your performance on constructives is random and therefore you shouldn’t practice them. But if your proof skills aren’t great (and I think that’s true for most people on the site) then idk how else you’re supposed to AC besides making an educated guess hopefully rooted in some sort of concrete observation / reasoning. Of course, observational skills/ reasoning skills / guessing skills all get better with practice.

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    guessforces became expertforces

  • »
    »
    5 weeks ago, # ^ |
      Vote: I like it 0 Vote: I do not like it

    i think of same but gave wrong answer how?

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

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

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

Constructive algo's are kind of hit and trial question in which we have to make logic by seeing the testcases most of the time the more you practice these kind of question the more you build the understanding how you can try different approaches at the time of contests.