Recently when i'am practicing i encounter two problems that have something common in them i could not understand editorial and others solutions too can someone help to find a approach for this kind of problems below are the links to two problems.
1237B - Balanced Tunnel
the editorial to this problem written by tourist
Spoiler
and the second problem.
591B - Rebranding
the solution to this problem in editorial
Spoiler
can anyone explain the intution behind this two problems?