jobseeking's blog

By jobseeking, history, 11 months ago, In English

Thanks in advance for attention to this 5-year old problem.

1266D - Decreasing Debts

Example input:

5 4
1 2 2
4 1 4
4 2 4
3 1 4

Example output: (generated by Accepted submissions / editorial algorithm, but I do not understand. Can be verified by 67085154)

3
4 1 6
4 2 2
3 2 4

I don't see a way to increase the edge 4-1 to a weight 6, by the operations described in the problem statement.

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
11 months ago, hide # |
 
Vote: I like it +2 Vote: I do not like it

First do an operation with a=4, b=2, c=3, d=1, z=4; that removes the 3->1 and 4->2 debts, adds 3->2 with debt 4 and makes the debt of 4->1 8. From there, an operation with a=4, b=1, c=1, d=2, z=2 gets you to the final graph.

»
11 months ago, hide # |
 
Vote: I like it 0 Vote: I do not like it

Job isn't the only thing you seeking imo. :)