Catch Fantômas
Commissioner Juve, while stationed in city A, has received intelligence that Fantômas is about to set sail on his submarine from city B. To intercept him in time, the commissioner must determine the most efficient route from city A to city B.
Between cities A and B lies a rectangular area that is Z km wide, divided into n zones. Each zone has a height of h_i km. Due to varying terrain, the commissioner can travel through each zone at a speed of V_i km/h. The width of the horizontal section of each zone is represented by Z_i.
Input
The first line of input contains: Z, N - the total width of the area and the number of zones, separated by spaces.
The second line contains: h_i - the heights of each zone, separated by spaces.
The third line contains: V_i - the travel speeds through each zone, separated by spaces.
The fourth line contains: K - the zone number for which you need to calculate the width Z_k.
Constraints are as follows: 1 ≤ N ≤ 1000; 1 ≤ K ≤ N; 1 ≤ L, H, V ≤ 10000. All input values are integers.
Output
Output the calculated value of Z_k, rounded to 2 decimal places.