For the preparation you arranged an arena — an infinite 2D-field. You also bought. n remote controlled cars and set them up on the arena. Unfortunately, the cars you bought can only go forward without turning left, right or around. So you additionally put the cars in the direction you want them to go.The goal of the show is to create a car collision as fast as possible!You noted that launching every car at the beginning of the show often fails to produce any collisions at all. Thus, you plan to launch the. , that's yet to be decided. Note that it's not necessary for. =j ) collide . The duration of the show is the time between the start and the end.What's the fastest crash you can arrange by choosing all. If it's possible to arrange a crash then print the shortest possible duration of the show. Otherwise, report that it's impossible.
You know, it's hard to conduct a show with lots of participants and spectators at the same place nowadays. Still, you are not giving up on your dream to make a car crash showcase! You decided to replace the real cars with remote controlled ones, call the event "Remote Control Kaboom Show" and stream everything online. For the preparation you arranged an arena — an infinite 2D-field. You also bought n n remote controlled cars and set them up on the arena. Unfortunately, the cars you bought can only go forward without turning left, right or around. So you additionally put the cars in the direction you want them to go. To be formal, for each car i i ( 1 le i le n 1≤i≤n ) you chose its initial position ( x_i, y_i x i ,y i ) and a direction vector ( dx_i, dy_i dx i ,dy i ). Moreover, each car has a constant speed s_i s i units per second. So after car i i is launched, it stars moving from ( x_i, y_i x i ,y i ) in the direction ( dx_i, dy_i dx i ,dy i ) with constant speed s_i s i . The goal of the show is to create a car collision as fast as possible! You noted that launching every car at the beginning of the show often fails to produce any collisions at all. Thus, you plan to launch the i i -th car at some moment t_i t i . You haven't chosen t_i t i , that's yet to be decided. Note that it's not necessary for t_i t i to be integer and t_i t i is allowed to be equal to t_j t j for any i, j i,j . The show starts at time 0 . The show ends when two cars i i and j j ( i ne j i =j ) collide (i. e. come to the same coordinate at the same time). The duration of the show is the time between the start and the end. What's the fastest crash you can arrange by choosing all t_i t i ? If it's possible to arrange a crash then print the shortest possible duration of the show. Otherwise, report that it's impossible.