Introduction - If you have any usage issues, please Google them yourself
Description of the meaning of the title for the book title contents are subject to change, " set the vehicle arrives uniformly distributed, the parameters specified by the user" to " input data given vehicle arrival time." Input Format The first line contains a positive integer N (1 < = N < = 20000), represents the total number of vehicles. N+1 second line to the first line, each line contains two integers p, q. (0 < = p < = 1,0 < = q < = 100000). p represents a vehicle type, 0 bus, 1 van. q represents the arrival time (in minutes). Output Format The output contains two numbers a, b. The average wait time on behalf of buses and trucks, accurate to three decimal places.