| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 2 초 | 1024 MB | 38 | 16 | 14 | 38.889% |
You are designing a controller for an interesting aircraft called the Single Copter. It only has one propeller, but the outgoing air flow is further shaped by four flaps that control three Euler angles (pitch, roll and yaw) that help maintain the requested orientation of the craft. Each of these flaps can assume any angle requested by the flight controller, and the effects of the flaps being at certain angles should translate to exerting the requested forces on pitch, roll and yaw.
Figure D.1: Pitch, roll and yaw on a Single Copter
Define the angles of the flaps to be $n,ドル $e,ドル $s,ドル and $w$ (for "north", "east", "south" and "west" respectively). The forces in the directions of pitch, roll and yaw are defined by the following equations:
\begin{align*} p &= e - w \\ r &= n - s \\ y &= n + e + s + w \end{align*}
As there are four variables and three constraints, you decided that, from the perspective of aerodynamics, it makes sense to make the maximum of the flap angles as small as possible, that is, you additionally want to minimise $\max\{ |n|, |e|, |s|, |w| \}$.
Find the best parameters to send to the Single Copter to achieve the desired pitch, yaw, and roll.
Output $q$ lines. In the $i$-th line, output the solution for the $i$-th request, four numbers $n_i,ドル $e_i,ドル $s_i,ドル $w_i,ドル separated by whitespace.
Your answer will be considered correct if the resulting pitch, roll and yaw differ by at most 10ドル^{-6}$ from the requested ones, and the maximum of the absolute values of flap outputs does not exceed the true value by more than 10ドル^{-6}$.
8 0 0 0 1 0 0 0 1 0 0 0 1 1 1 0 1 0 1 0 1 1 1 1 1
0.0 0.0 0.0 0.0 0.0 0.5 0.0 -0.5 0.5 0.0 -0.5 0.0 0.25 0.25 0.25 0.25 0.5 0.5 -0.5 -0.5 0.5 0.5 0.5 -0.5 0.5 0.5 -0.5 0.5 0.75 0.75 -0.25 -0.25
ICPC > Regionals > Europe > Northwestern European Regional Contest > The UK & Ireland Programming Contest > UKIEPC 2024 D번