Drawing Lines

시간 제한1초메모리 제한2048 MB

문제

This is an interactive problem.

The jury has an image of a straight line segment with endpoints $(X_1, Y_1)$ and $(X_2, Y_2)$. The coordinates satisfy the following constraints:

  • $X_1, Y_1, X_2, Y_2 \in \left[-10\,000; 10\,000\right]$.
  • The length of the segment is at least $100$.

Your task is to produce the same image.

You are allowed to create several images of the same kind: images of a straight line segment with endpoints $(x_1, y_1)$ and $(x_2, y_2)$. After you created an image, you will get the similarity ($\mathrm{sim}$) of your image and jury's by the following formulas:

$$ \mathrm{dst}(a_1, b_1, a_2, b_2) = \sqrt{(a_1 - a_2)^2 + (b_1 - b_2)^2}\text{;} $$ $$ s = \min\left(\mathrm{dst}(x_1, y_1, X_1, Y_1) + \mathrm{dst}(x_2, y_2, X_2, Y_2), \mathrm{dst}(x_1, y_1, X_2, Y_2) + \mathrm{dst}(x_2, y_2, X_1, Y_1)\right)\text{;} $$ $$ \mathrm{sim} = \max\left(0, \frac{40\,000 - s}{40\,000}\right)\text{.} $$

The goal is to make an image with $100\%$ similarity using no more than $25\,000$ tries.