problem in understanding editorial of "chef under pressure"??

dfs
dynamic-programming
graph
tree

#1

I referred to editorial of this question but everything seemed to have crossed my head.

Can anyone please explain this editorial.


#2

hey can we build a team me and you ???


#3

@daza56456zad
for what??