What does it mean: "reach smth"? It's a strict condition, but how should i understand it?) In my opinion, this sample has two right answers: 4 0 0 0 1 0 5 0 8 2 * (1.5 * 1.5) * M_PI or (1 + 3 * 3) * M_PI.
Re: Statement👨🏻💻 Spatarel Dan Constantin26 Feb 2026 06:31
You have to find the largest possible answer.
Thus the correct answer is: (1 * 1 + 3 * 3) * M_PI = 31.4159
Firstly i calculate the longest rope lenths at each tree. Then just try to tether goats to every tree, calculating the square. If sum of 2 maxrope are larger then lenght between trees: double maxrad = std::max(maxr[i], maxr[j]); double minrad = l - maxrad; if (minrad < 1.0) { maxrad = maxrad - (1 - minrad); minrad = 1.0; } if (maxrad >= 1.0) maxsize = std::max(maxsize, square(maxrad)+sqree(minrad));
It's because of /Za switch. The compiler produces the following warning about the hypot function call in the case of C language: warning #266: function declared implicitly