complete the code

profilecorrected
state-03.res

Claim matrix C R0 R1 R2 R3 P0 9 5 5 5 P1 2 2 3 3 P2 7 5 4 4 P3 3 3 3 2 P4 5 2 2 1 P5 4 4 4 4 Allocation matrix A R0 R1 R2 R3 P0 2 0 2 1 P1 0 1 1 1 P2 4 1 0 2 P3 1 1 0 0 P4 1 0 1 1 P5 -1 -1 -1 -1 Need matrix C-A R0 R1 R2 R3 P0 7 5 3 4 P1 2 1 2 2 P2 3 4 4 2 P3 2 2 3 2 P4 4 2 1 0 P5 5 5 5 5 Resource vector R R0 R1 R2 R3 15 6 9 10 Available vector V R0 R1 R2 R3 8 4 6 6 State is safe