https://ide.codingblocks.com/#/s/14222
https://hack.codingblocks.com/contests/c/452/975
Please check this code
3
1 1
2 4
5 5
chck this case. you are getting 0 but answer should be 4
3
1 1
2 4
5 5
chck this case. you are getting 0 but answer should be 4