文件名称:OptimalServices
-
所属分类:
- 标签属性:
- 上传时间:2012-11-16
-
文件大小:228.68kb
-
已下载:0次
-
提 供 者:
-
相关连接:无下载说明:别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容来自于网络,使用问题请自行百度
acm算法设计
描述:
设有n 个顾客同时等待一项服务。顾客i需要的服务时间为ti ,1 < = i < = n 。应如何安排n个顾客的服务次序才能使平均等待时间达到最小?平均等待时间是n 个顾客等待服务时间的总和除以n。
对于给定的n个顾客需要的服务时间,编程计算最优服务次序。
输入:第一行是正整数n,表示有n 个顾客。接下来的1行中,有n个正整数,表示n个顾客需要的服务时间。
输出:最小平均等待时间
例输入:
10
56 12 1 99 1000 234 33 55 99 812
例输出:
532.00
-acm algorithm design Descr iption: n has a customer waiting for a service at the same time. I need to service customers time ti, 1 < = i < = n. N how to arrange the order of a customer' s service to make the average waiting time to a minimum? Average waiting time is n-time customers wait for service by dividing the sum of n. N for a given month of the service needs of customers, the best services to the order of the calculation program. Input: the first line is a positive integer n, that there are n customer. 1 the next line, there is a positive integer n, that n of the service needs of customers. Output: the minimum average waiting time for cases of type: 10 56 12 1 99 1000 234 33 55 99 812 cases Output: 532.00
描述:
设有n 个顾客同时等待一项服务。顾客i需要的服务时间为ti ,1 < = i < = n 。应如何安排n个顾客的服务次序才能使平均等待时间达到最小?平均等待时间是n 个顾客等待服务时间的总和除以n。
对于给定的n个顾客需要的服务时间,编程计算最优服务次序。
输入:第一行是正整数n,表示有n 个顾客。接下来的1行中,有n个正整数,表示n个顾客需要的服务时间。
输出:最小平均等待时间
例输入:
10
56 12 1 99 1000 234 33 55 99 812
例输出:
532.00
-acm algorithm design Descr iption: n has a customer waiting for a service at the same time. I need to service customers time ti, 1 < = i < = n. N how to arrange the order of a customer' s service to make the average waiting time to a minimum? Average waiting time is n-time customers wait for service by dividing the sum of n. N for a given month of the service needs of customers, the best services to the order of the calculation program. Input: the first line is a positive integer n, that there are n customer. 1 the next line, there is a positive integer n, that n of the service needs of customers. Output: the minimum average waiting time for cases of type: 10 56 12 1 99 1000 234 33 55 99 812 cases Output: 532.00
(系统自动生成,下载前可以参看下载内容)
下载文件列表
Optimal Services/Debug/Optimal Services.exe
Optimal Services/Debug/Optimal Services.ilk
Optimal Services/Debug/Optimal Services.obj
Optimal Services/Debug/Optimal Services.pch
Optimal Services/Debug/Optimal Services.pdb
Optimal Services/Debug/StdAfx.obj
Optimal Services/Debug/vc60.idb
Optimal Services/Debug/vc60.pdb
Optimal Services/Optimal Services.cpp
Optimal Services/Optimal Services.dsp
Optimal Services/Optimal Services.dsw
Optimal Services/Optimal Services.ncb
Optimal Services/Optimal Services.opt
Optimal Services/Optimal Services.plg
Optimal Services/ReadMe.txt
Optimal Services/StdAfx.cpp
Optimal Services/StdAfx.h
Optimal Services/Debug
Optimal Services
Optimal Services/Debug/Optimal Services.ilk
Optimal Services/Debug/Optimal Services.obj
Optimal Services/Debug/Optimal Services.pch
Optimal Services/Debug/Optimal Services.pdb
Optimal Services/Debug/StdAfx.obj
Optimal Services/Debug/vc60.idb
Optimal Services/Debug/vc60.pdb
Optimal Services/Optimal Services.cpp
Optimal Services/Optimal Services.dsp
Optimal Services/Optimal Services.dsw
Optimal Services/Optimal Services.ncb
Optimal Services/Optimal Services.opt
Optimal Services/Optimal Services.plg
Optimal Services/ReadMe.txt
Optimal Services/StdAfx.cpp
Optimal Services/StdAfx.h
Optimal Services/Debug
Optimal Services
本网站为编程资源及源代码搜集、介绍的搜索网站,版权归原作者所有! 粤ICP备11031372号
1999-2046 搜珍网 All Rights Reserved.