Help needed in CSES problem: Food Division

Revision en1, by code_struck, 2020-07-16 15:55:07

Hi everyone,

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:

  1. 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.

  2. 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 to 1000. So, I am unable to debug my above approach with smaller test cases.

As a result, I am requesting your help. Any hint/similar problems with editorials would be very helpful.

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en4 English code_struck 2020-10-04 20:55:36 2 Tiny change: 'nput size to 1000. S' -> 'nput size upto 1000. S'
en3 English code_struck 2020-07-16 16:11:34 104
en2 English code_struck 2020-07-16 15:55:46 0 (published)
en1 English code_struck 2020-07-16 15:55:07 905 Initial revision (saved to drafts)