Re: 12920 - Patty's Gift
Posted: Tue Jun 23, 2015 8:27 pm
Can the sample data be explained:
Input
Output
My concern is, the distance from (2, 5) to (7, 4) is sqrt(26) = 5.099019514 which is greater than the given 5.099, so here is the case that if the string is shorter than the distance of the nails, what happends?
The problem is looking at the precision of 1.0e-6 while this input is off the tolerance, and is this data actually in the test data?
Input
Code: Select all
2 5 7 4 5.099
Code: Select all
7 4
The problem is looking at the precision of 1.0e-6 while this input is off the tolerance, and is this data actually in the test data?