How to tackle this rounding stuff? I do it this way:
- Code: Select all
ce = fabs(rating[i] + 3.0 - rating[j])/10.0;
ce = ((int)(100*ce) + 1)/100.0
thus rounding (hopefully) as they say in the description. The rules seems unclear, too.
Why not allow the error 0.01? I't huge, of course, but knowing as you do the story of UVa358 - "Don't have a Cow, Dude"...