Avian Darts

TimeLimit:1500MS  MemoryLimit:524288KB
64-bit integer IO format:%I64d
Special Judge
未提交 | 登录后收藏
Problem Description
International Combat Aerobatics Competition “Avian Darts” is opening soon and Andrei was selected as a participant.

He and his wingmen planned several awesome aerobatic flights that will certainly delight the judges and award them gold medals. The only problem is to form a formation at the end of competition and that’s why they want to know their exact coordinates and attitudes after performing aerobatics.



He navigates his aircraft by using the joystick and pedals to roll, pitch and yaw. Aerobatic flights consist of courses whose rotational speeds about three axes of the aircraft are given. As you know, direction of velocity always aims the frontwards of the aircraft.

Their aircrafts are $5^{th}$ generation aircrafts: “Су-57 (Sukhoi-57)”. Therefore, they are not affected by weather and never enter a stall which means that they’re very safe during flight.

You can ignore thrust vectoring, angle of attack, size of aircraft, lift, air resistance, inertia and gravity in this problem.

Input
Input consists of multiple test cases.

First line of each test case contains a non-negative integer n (≤10), the number of courses during the flight.

The next n lines contain 5 integers $ω_x$, $ω_y$, $ω_z$, v and t.

$ω_x$, $ω_y$, $ω_z$ are rotational speeds of rolling, pitching, yawing in degrees per second and then, v and t denote speed of aircraft in $ms^{-1}$ and duration in seconds.

Aircraft rolls to the left if $ω_x$<0 while it rolls to the right if $ω_x$>0. It climbs (dives) if $ω_y$<0 ($ω_y$>0). It also slides right (left) if $ω_z$<0 ($ω_z$>0).

|$ω_x$ |≤180, |$ω_y$ |≤120, |$ω_z$ |≤60, 100≤v≤500, 0<t≤10

It is guaranteed that there will be no more than $10^4$ test cases.

Input is terminated with end of file.

Initially, Andrei’s aircraft is located at (0,0,0) and unit vectors towards its front, left and up are {1,0,0}, {0,1,0} and {0,0,1} as shown in the figure.
Output
Answer for each test case has four lines each of which contains 3 real numbers.

Output x, y and z coordinates on the first line.

On the second line, output x, y and z elements of a unit vector towards the front. Output unit vectors towards the left and up on the third and fourth lines respectively.

Lengths of unit vectors must be equal to 1. Your answer will be acceptable if its absolute or relative error does not exceed $10^{-6}$.

Output a blank line after each test case.
SampleInput
1
60 0 0 340 3
2
90 0 0 500 1
0 -30 0 200 3
1
0 0 30 100 6
SampleOutput
1020.000 0.000 0.000
1.000 0.000 0.000
0.000 -1.000 0.000
0.000 0.000 -1.000

881.97186342 -381.97186342 0.000
0.000 -1.000 0.000
0.000 0.000 1.000
-1.000 0.000 0.000

0.000 381.97186342 0.000
-1.000 0.000 0.000
0.000 -1.000 0.000
0.000 0.000 1.000

 Hint p shows the coordinates of Andrei. i, j and k are unit vectors towards front, left and up of the aircraft.
Submit
题目统计信息详细
总AC数0
通过人数0
尝试人数0
总提交量0
AC率0.00%
AC该题后可以添加标签
贴完标签可以获得20ACB。
并且可以获得本题所有提交代码查看权限。
点击标题可以显示标签。
如果你还没认真思考过这题,请不要查看标签
如果您已经通过了该题,请务为该题贴上标签
出处

T^T Online Judge

[BUG反馈] [FAQ] [闽ICP备17026590号-1]
当前版本:3.24 系统时间: