u/Available_Buy5643

EDU Div2 Problem D prefix sum approach

In yesterday's edu div2, imo spotting LCS was undoubtably easy but where to apply it made the problem way harder...

So this is a question to the ones who successfully solved D: how did you arrive/think about the "Prefix sum % 10" possibility and how did you prove/know it was correct? because in my eyes spotting that is not intuitive at all, even now im not fully convinced on why that approach works as correctly as it does.

reddit.com
u/Available_Buy5643 — 12 hours ago