How to solve this problem

Hello codechef users!
I’m trying to solve this problem.

Help, please. I cant understand how to solve it.

Look at Please explain the RIN's network flow solution - general - CodeChef Discuss