Below are the links to both the problems. https://atcoder.jp/contests/dp/tasks/dp_m
https://atcoder.jp/contests/dp/tasks/dp_k
I have read and re-read the problems again but I am not able to understand how to solve these two. I have seen the submissions of other contestants, even from that I am not able to make much sense.
Thanks