Wrong answer in HelpingLira problem

http://www.codechef.com/viewsolution/3267094
please help!! thanks in advance

Your code got AC with slight changes.

  1. There is no need to divide area by 2 as we want only position not exact answer. This removed the requirement of float.Using float or double in code increase the chances of precision errors. So, I changed float to int.
  2. Minimum and maximum values of integer are defined as macro INT_MIN and INT_MAX respectively in <climits> header.
1 Like
//