← Retour à l'épreuve

Kazakhstan FAIO 2024 · Énoncé

D. Flight Speed 2: Data Lost

Mis en forme par IOAI Training à partir de l'original (BeksultanSagyndyk/faio-tasks, licence Apache-2.0). L'original fait foi.

https://contest.yandex.ru/contest/71291/problems/D/

Time limit: 1 second
Memory limit: 64 MB
Input: standard input or input.txt
Output: standard output or output.txt

A team of space engineers flew to the station, but debris altered their speed at the very start, breaking the plan from the previous task. It is known that the new time–distance graph is also a parabola. Runi managed to record data for their ship at three points before the sensor failed. They hope this is enough to recover the graph.

Find the real numbers a, b, c of the parabola [ y = a x^2 + b x + c ] given that it passes through three points with real coordinates:

  • The first point is ((x_1, y_1)).
  • The second point is to the left of the first point by (x_2) and above the third point by (y_2).
  • The third point is ((x_3, y_3)).

Thus, the second point has coordinates ((x_1 - x_2,; y_3 + y_2)).

All mentioned variables are greater than (-1000) and less than (1000).

Input
Six real numbers on one line separated by spaces:
x1 y1 x2 y2 x3 y3

Output
Print the three real numbers a b c separated by spaces.