HELLO THERE, I HAVE RECENTLY TRIED TO SOLVE A PROBLEM [problem:1428A] AND CAME THROUGH AN INTERESTING FACT...I HAVE USED AN IF CONDITION LIKE THIS: if(abs(a-b)*abs(c-d)!=0; AND I WAS GETTING WRONG OUTPUT FOR TEST CASE a=1 c=1 b=65537 d=65537.
THEN I HAVE CHECKED FEW VALUES:..
cout<<65535*65535<<endl;//-131071.
cout<<65536*65536<<endl;//0.
cout<<65537*655367<<endl;//1114119.
SO I CAME TO CONCLUSION THAT SOME OVERFLOW THING IS HAPPENING HERE...
SO BE BE CAREFUL WHEN THERE IS CHANCE OF GETTING 65536*65536==0 IN YOUR CODE.
ALSO I WOULD LIKE TO KNOW SUCH CORNER CASES IF U KNOW ANY.
THANK YOU AND HAVE A NICE DAY;)