아직 만들고 있는 페이지입니다.

이 페이지는 아직 만드는 중입니다. 보이는 내용은 바뀔 수 있습니다.

Give the Parabellum away

시간 제한2초메모리 제한1024 MB

요약
오스타프는 일정한 속도로 움직이고 키슬라르스키는 그와의 거리를 일정하게 유지하며 반시계 방향으로 일정한 속력으로 움직일 때, 주어진 각 시각에서 키슬라르스키의 위치를 구한다.
난이도

보통10점 중 4점

유형
기하, 시뮬레이션, 수학
정답자
아직 제출이 없습니다

문제

Ostap is strolling leisurely along the Yessentuki-Moscow route, and scuttling along him is Kislarsky, begging to take his Parabellum away. Kislarsky keeps distance to Ostap strictly constant. Also he keeps constant his speed relative to the ground. He is moving counterclockwise relative to Ostap. Ostap's velocity stays constant (both direction and magnitude-wise).

Help Kislarsky to get away from the Alliance of the Sword and Ploughshare. Find the coordinates of the points where he will be in the given time moments t_it\_i.

입력

The first line of the input file contains eight integers: p_xp\_x, p_yp\_y, q_xq\_x, q_yq\_y, u_xu\_x, u_yu\_y, vv, NN, where:

  • p_xp\_x, p_yp\_y --- the location of Ostap in the initial moment (∣p_x∣,∣p_y∣≤104|p\_x|, |p\_y| \le 10^4),
  • q_xq\_x, q_yq\_y --- the location of Kislarsky in the initial moment (∣q_x∣,∣q_y∣≤104|q\_x|, |q\_y| \le 10^4),
  • u_xu\_x, u_yu\_y --- the projections of Ostap's velocity upon the coordinate axes OXOX and OYOY respectively (∣u_x∣,∣u_y∣≤10|u\_x|, |u\_y| \le 10),
  • vv --- the speed of Kislarsky relative to the ground (u_x2+u_y2+12<v≤10\sqrt{u\_x^2 + u\_y^2} + \frac{1}{2} < v \le 10),
  • NN --- the number of time moments when the location of Kislarsky is of interest (1≤N≤100,0001 \le N \le 100\\,000).

The second line contains NN real numbers t_it\_i -- the moments in time for which the location of Kislarsky must be found (0≤t_i≤10000 \le t\_i \le 1000). All numbers t_it\_i are provided with at most five digits after decimal point.

It is guaranteed that initial locations of Ostap and Kislarsky are different.

출력

The output file must contain NN pairs of real numbers (two per line): XX and YY coordinates of Kislarsky's location at the time moment t_it\_i.

The absolute or relative error of each number must not exceed 10−510^{-5}.

예제1

  1. 예제 1

    입력
    2 3 4 5 1 1 2 10
    1 2 3 4 5 6 7 8 9 10.00
    
    예상 출력
    3.311667781 6.811203158
    1.618058050 6.525238521
    2.396313856 4.895093459
    4.356603786 4.697990251
    6.268584256 5.267779107
    8.050839947 6.172029827
    9.724368272 7.265902232
    11.304988035 8.490616365
    12.800188718 9.818413289
    14.210788762 11.235796766