| acmsguru |
|---|
| Finished |
, which can be set to an integer value from 1 to 109 during the door installation. Then the door functions on the following principle. If a person passes through the door at time p, the door opens at time p - t and closes at time p + t. There is an exceptional case when several people go in a row with a time interval not exceeding 2 t between any two consecutive people. In this case the door opens only once, t seconds before the first person in the row, and it closes t seconds after the last person in the row has passed through it. It is very important to set the optimal values of the door parameters. On the one hand, if the doors open and close too often, it will annoy visitors. On the other hand, if both doors stay opened for a long time, visitors can get cold.
for the doors — t1 for the first door and t2 for the second one that satisfy the following conditions:No solution".
sample input | sample output |
3 2 4 1 6 13 7 11 | 3 2 |
| Name |
|---|


