|
||||||||||
Avian DartsTime Limit: 3000/1500 MS (Java/Others) Memory Limit: 524288/524288 K (Java/Others)Total Submission(s): 139 Accepted Submission(s): 52 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. Sample Input
Sample Output
Hint p shows the coordinates of Andrei. i, j and k are unit vectors towards front, left and up of the aircraft. Source | ||||||||||
|