complete the code

profilecorrected
state-02.res

Claim matrix C R0 R1 R2 P0 3 2 2 P1 6 1 3 P2 3 1 4 P3 4 2 2 Allocation matrix A R0 R1 R2 P0 2 0 1 P1 5 1 1 P2 2 1 1 P3 0 0 2 Need matrix C-A R0 R1 R2 P0 1 2 1 P1 1 0 2 P2 1 0 3 P3 4 2 0 Resource vector R R0 R1 R2 9 3 6 Available vector V R0 R1 R2 0 1 1 State is unsafe