HRSCPMTR - Editorial

the value of matrix gets updated after every query, in the second test case the value of A(1,1) got updated to 5 ,thus the third test case was correct where A(2,2) was 5 ,since A(1)(1) was already 5