I am stuck at this problem 'Food Division' from 'CSES Problem Set' for about 2 weeks. I have tried below things but still, I can't come up with the correct solution:
I used the approach in solving the 'BALIFE — Load Balancing' problem from SPOJ. Basically, I iterated over the circle, used the current node as the starting point, and then applied the algorithm used in the BALIFE problem.
Also, I wrote minimum cost maximum flow tester to stress test the above approach on random tests. The above approach is giving correct answers on random tests with input size upto 1000. So, I am unable to debug my above approach with smaller test cases.
I have also tried basic greedy strategies like saturating the highest/lowest sources/sinks first.
As a result, I am requesting your help. Any hint/similar problems with editorials would be very helpful.