|
|
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. 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)); Try this test 4 0 0 5 0 6 0 6.5 0 Right answer is 53.4071 Thx, really nice test. Now AC :) Yeah... I was caught by that too :)) I've got wrong answer on 20th test. Please could anybody give me some test, which will help? I got right answers on all test in the forum... help me This test helped me 2 0 0 100 100 answer .. 15707.9633 View submissions 2451935 - WA-1 2451940 - AC The only differ is language. C or C++. Explain, please, this effect. 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 Thank you! :) Hm... Funny "warning". It'd be better to get smth like "error: unresolved external symbol _hypot" ) "You may assume that the goat is fastened so that it can’t leave the plot’s area." Can you explain clearly? Does it matter to solve the task? P. S. WA#5 |
|
|