I have directed graph (maybe with cycles), and some resources in vertices (let's say gold). I can transfer gold between vertices only in direction of edges. The task is to minimize maximum value of resources in vertices (e.g. make optimal redistribution of gold).
6 => 5 => 5 => 5
So the answer is 6.
Or another example:
The answer is 9.
I think that solution should be based on finding max flow in graph and binary search for answer, but I can't connect these approaches and build proper solution. Could you please help?