### Shayan's blog

By Shayan, history, 13 days ago,

## 1990E2 — Catch the Mole(Hard Version)

Not a formal proof! (please explain the formal proof of the algorithm in the comment section if you know that)

• +5

 » 13 days ago, # |   0 Congrats for reaching 10K dude <3
•  » » 13 days ago, # ^ |   +4 Thank you bro <3
 » 13 days ago, # |   +18 Why video editorial?
•  » » 13 days ago, # ^ |   +2 text editorials take time to complete , besides Shayan does some clean coding too , so its nice in the mean time.
•  » » 13 days ago, # ^ |   0 The authors will prepare the text editorial.
 » 13 days ago, # |   0 Can someone please explain problem D? I understood everything in the editorial up until adding the second dimension to the dp array. I don't get that part, why do we add dp[i][j] where j can be {0,1,2,3}? And is there a way to solve this without adding this second dimension?
 » 13 days ago, # |   +3 Problem D can be solved using greedy: https://codeforces.com/contest/1990/submission/271628945
 » 13 days ago, # |   +10 The "A.Submission Bait" problem really lives up to its name
 » 13 days ago, # |   +3 Problem D greedy solution with just 2 variables and one for loop: 271663296 Idea/SolutionAlways color a 2x2 grid if the remaining area on a_i after a_i-1 is colored is <= 2, otherwise it is always optimal to color the entire row.
•  » » 13 days ago, # ^ |   +1 Same idea here, but tracking column indices instead: 271665697
•  » » 13 days ago, # ^ |   -12 trash ass solution. clearly codeforces is not for u lil bluh
•  » » » 13 days ago, # ^ |   +2 What didn't you like about it? Maybe we can improve if u tell us so.
 » 13 days ago, # |   0 Please add Russian subtitles to the video
 » 13 days ago, # | ← Rev. 2 →   0 Shayan, could you please answer this.... for Problem D, dp[i][j], j={0,1,2,3} what is the j here ? , is it {00,01,10,11} where each boolean value tell us about the use of the 1st and 2nd 2x2 block in i_th row ?
•  » » 12 days ago, # ^ |   0 Exactly. It shows the 4 possible ways for the 1st and the 2nd 2*2 block in the row number i.
 » 12 days ago, # |   0 why is it getting downvoted?