ACM-ICPC-Algorithms icon indicating copy to clipboard operation
ACM-ICPC-Algorithms copied to clipboard

Calculation bug

Open glenprivacy opened this issue 6 years ago • 1 comments

mid = (lower + (higher - lower)) / 2; is not working mid will just turn out to be higher / 2 in every loop

glenprivacy avatar Jul 26 '19 03:07 glenprivacy

Or it should be lower + (higher - lower) / 2 as it seems like the previous editor wanted to avoid overflow for large value calculation

glenprivacy avatar Jul 26 '19 08:07 glenprivacy