https://hack.codingblocks.com/contests/c/452/975
https://ide.codingblocks.com/#/s/18997
Grand temple wrong testcase
Ur code is giving wrong output for this test case
3
1 1
2 4
5 2
Actually what you have to do is , just find maximum difference in y and max difference in x and then your answer
should be (diff_x)*(diff_y)
I have written its code you can take help from it if needed
https://ide.codingblocks.com/#/s/19101
but in ur code area is (diff_x - 1)(diff_y - 1)
why? it should be (diff_x)(diff_y)
nope, actually difference will include the row and column having river too . thats why i subtracted 1 from each and then calculated my answer
can you please explain m the working of this code and why we had taken pp and p please explain