Some one can help me this problem...

Правка en3, от rb235, 2022-02-08 19:59:04

We has a N (N <= 10^5) position and 2 car on shaft number (from 0 to 10^9). Initially 2 cars in 2 positions different on the shaft number. Mission is each position in N position has been visited by only 1 in 2 car and visited by ordered 1, 2, 3, .. N. We have a lot of way. But we need find one way has max distance of car 1 and car 2 all time is minimum. Print minimum distance.

Input:

First line has N, pos of car 1, pos of car 2

Second line has N position

Example:

Inp
Out
Note

Thanks! <3

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский rb235 2022-02-08 19:59:04 0 (published)
en2 Английский rb235 2022-02-07 17:13:48 14 (saved to drafts)
en1 Английский rb235 2022-02-07 17:06:36 873 Initial revision (published)