How to solve D from Codeforces Round #609

How to solve the D question from today’s Codeforces contest.

I answered your query…

1 Like

Do you mean Div1 or Div2 contest? Both are 609

Div 2 : Domino for young, i think so :stuck_out_tongue: