I got a wrong answer of this test case.
[[0,1,5],[2,3,1],[2,0,1],[4,0,2]]
My answer is 3, while the expected answer is 4.
(3) gives (2) $1
(1) gives (0) $2
(1) gives (4) $2
Am I right?
@haichen.sjtu You are wrong, bro.
After all transactions, there result is [-2, 5, -2, 1, -2]. According to your sol, it will be [0,1,-1,0,0]