文件名称:1207
介绍说明--下载内容均来自于网络,请自行研究使用
Descr iption
本题题意对于书上内容有变动,“设车辆到达服从均匀分布,参数由用户指定”改为“输入数据给出每辆车的到达时间”。
Input Format
第一行含有一个正整数N(1<=N<=20000),代表总车辆数。
第二行到第N+1行,每行包含两个整数p,q.(0<=p<=1,0<=q<=100000)。p代表车辆类型,0代表客车,1代表货车。q代表到达时间(单位为分钟)。
Output Format
输出包含两个数a,b。代表客车和货车的平均等待时间,精确到小数点后三位。-Descr iption 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.
本题题意对于书上内容有变动,“设车辆到达服从均匀分布,参数由用户指定”改为“输入数据给出每辆车的到达时间”。
Input Format
第一行含有一个正整数N(1<=N<=20000),代表总车辆数。
第二行到第N+1行,每行包含两个整数p,q.(0<=p<=1,0<=q<=100000)。p代表车辆类型,0代表客车,1代表货车。q代表到达时间(单位为分钟)。
Output Format
输出包含两个数a,b。代表客车和货车的平均等待时间,精确到小数点后三位。-Descr iption 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.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
1207\1207.cbp
....\1207.depend
....\1207.layout
....\bin\Debug\1207.exe
....\main.cpp
....\obj\Debug\main.o
....\bin\Debug
....\obj\Debug
....\bin
....\obj
1207