eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач
Задачи

Biggest Slice

Biggest Slice

You are sharing a large, circular pizza with \textbf{n−1} of your friends. Your technique for slicing the pizza is shown in \textit{\textbf{Figure 1}}; you rotate the pizza clockwise about its center by angle \textbf{θ}, and then you make a slice from the center of the pizza straight to the right. You repeat this process, rotating by the same angle \textbf{θ} and slicing to the right until you have done it a total of n times. \includegraphics{https://static.e-olymp.com/content/af/afbb7104a5a86302e25b46aad010d8a3df69fe27.jpg} \textit{\textbf{Figure 1}}: Rotate-and-slice pizza division technique. Of course, this isn't really a good way to divide a pizza (unless \textbf{θ} is well-chosen). Some of the resulting slices may be larger than others, and you may not even end up with n different slices. You don't care so much about fairness. You just want to know how big the largest slice will be, so you can take it for yourself. \InputFile Input begins with an integer \textbf{1} ≤ \textbf{m} ≤ \textbf{200} indicating the number of test cases that follow. The following \textbf{m} lines each contain one test case. Each test case gives the pizza radius in centimeters, \textbf{r}, followed by the number of people sharing the pizza, \textbf{n}, followed by the rotation angle, \textbf{θ}. The quantities \textbf{r}, \textbf{n} and \textbf{θ} are all positive. The value \textbf{r} is an integer no greater than \textbf{100}, and \textbf{n} is an integer no greater than \textbf{10^8}. The angle \textbf{θ} is given as an integer number of degrees, followed by an integer number of minutes and an integer number of seconds. Degrees are between \textbf{0} and \textbf{359 }(inclusive), while minutes and seconds are between \textbf{0} and \textbf{59} (inclusive). \OutputFile For each test case, print the area in square centimeters of the largest resulting slice of pizza. You do not need to worry about the precise formatting of the answer (e.g. number of places past the decimal), but the absolute error of your output must be smaller than \textbf{10^\{-4\}}.
Лимит времени 1 секунда
Лимит использования памяти 64 MiB
Входные данные #1
4
20 6 60 0 0
20 6 59 59 59
30 20 33 30 0
40 200 120 0 0
Выходные данные #1
209.439510
209.444358
263.108385
1675.516082
Источник 2013 ACM-ICPC North American Qualification Contest