| 
 | 
вернуться в форумwa 1,2,3, ..., 12 "If it is not possible to construct the fence from the specified blocks, write 0.00." - dementia   binary search from the maximum side across the floors to infinity is a bad idea - a ternary search is better suited, it can be run over all segments equal in length to the root from infinity, and also for prevention it is worth adding a few additional random segments (about 10,000) I would highlight a few good infinities such as 5e6, 1e8, 1e10, 1e6, 1e5, 2.625e6   The order of the walls is not important   #define ld long double   ld arcsin(ld k) {     if (k >= 1) {         k = 1;     }     if (k <= -1) {         k = -1;     }       return asinl(k); } (I hope you won't need this feature.)   i think 1e-10 nice eps, but i dont sure  |  
  | 
|