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?
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.
so, it's kinda luck based? (:
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.
this is actually a great take thanks for sharing
guessforces became expertforces
i think of same but gave wrong answer how?
I read the problem and my immediate reaction was we need alternating sequence. I think you just need experience.
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.