Logo
(追記) (追記ここまで)

32563번 - Drone Control 스페셜 저지다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 1024 MB38161438.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.

Pitch Roll 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.

입력

  • One line containing the number $q,ドル 1ドル \le q \le 10^4,ドル the number of requests to follow.
  • $i$ further lines, each containing three real numbers $p_i,ドル $r_i,ドル $y_i$ ($-1 \le p_i, r_i, y_i \le +1$).

출력

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}$.

제한

예제 입력 1

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

예제 출력 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번

  • 문제를 만든 사람: Maxim Buzdalov
(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /