2014-2015 ACM-ICPC, NEERC, Moscow Subregional Contest C. CIA Datacenter
2015-12-21 15:10
841 查看
C. CIA Datacenter
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
The CIA has decided to keep up with technology advancements and try to capture all the information passing in the internet. In order to store that information, they need to build a new datacenter. Since the information on the internet cables is captured with a very high speed, the datacenter needs to be built with a very high write speed capability. The information on this stage is only collected for future processing and will be deleted in a small period of time, therefore the reliability of storage is not in question, only the total speed of writing information to disks is important.
In order to fit in a tight budget set by the Congress last year, agency has decided to use cheap commercial-grade disks and controllers. The datacenter storage architecture is simple: disks are connected to controllers (there is no limit how many disks can be connected to a single controller) that are in turn connected to the central information intake. Every disk and controller can operate in parallel with others thus writing the data simultaneously. However, there are limits on the maximum writing speed for disks and on the maximum speed with which the controller can process incoming data.
The total write speed of the disks connected to one controller is the minimum between the sum of all disks' write speed limits and the speed limit of the controller.
Given the projected speed of information capture, please help CIA technical personnel to minimize the money spent on disks and controllers. The structure of market prices is such that you can assume it is crucial to minimize the number of disks first and then to minimize the number of controllers (without changing the number of disks).
Input
The first line of input contains integers A, B and C: the write speed limit of the disk, the speed limit of the controller for processing incoming data and the expected information capture speed (1 ≤ A, B, C ≤ 109).
Output
The first line of output should contain two integers X and Y: the number of disks and controllers needed to be able to save all incoming data according to the problem statement.
Sample test(s)
input
output
input
output
input
output
input
output
time limit per test
2 seconds
memory limit per test
256 megabytes
input
standard input
output
standard output
The CIA has decided to keep up with technology advancements and try to capture all the information passing in the internet. In order to store that information, they need to build a new datacenter. Since the information on the internet cables is captured with a very high speed, the datacenter needs to be built with a very high write speed capability. The information on this stage is only collected for future processing and will be deleted in a small period of time, therefore the reliability of storage is not in question, only the total speed of writing information to disks is important.
In order to fit in a tight budget set by the Congress last year, agency has decided to use cheap commercial-grade disks and controllers. The datacenter storage architecture is simple: disks are connected to controllers (there is no limit how many disks can be connected to a single controller) that are in turn connected to the central information intake. Every disk and controller can operate in parallel with others thus writing the data simultaneously. However, there are limits on the maximum writing speed for disks and on the maximum speed with which the controller can process incoming data.
The total write speed of the disks connected to one controller is the minimum between the sum of all disks' write speed limits and the speed limit of the controller.
Given the projected speed of information capture, please help CIA technical personnel to minimize the money spent on disks and controllers. The structure of market prices is such that you can assume it is crucial to minimize the number of disks first and then to minimize the number of controllers (without changing the number of disks).
Input
The first line of input contains integers A, B and C: the write speed limit of the disk, the speed limit of the controller for processing incoming data and the expected information capture speed (1 ≤ A, B, C ≤ 109).
Output
The first line of output should contain two integers X and Y: the number of disks and controllers needed to be able to save all incoming data according to the problem statement.
Sample test(s)
input
2 10 100
output
50 10
input
10 2 100
output
50 50
input
20 35 140
output
7 7
input
20 35 141
output
8 5 题意:比较难说明,但比较简单。 分析:先保证disks最少,肯定是做一次除法就好,接下来就是调整controllers的数量使它能够装下这些disks。 很简单的题目,不过细节较多。
相关文章推荐
- 开始新的旅程
- 垃圾回收GC:.Net自己主动内存管理 上(一)内存分配
- 改变状态栏颜色
- Red-Black Tree 与 STL源码 (0)
- 软件项目管理中的需求管理要以用户为中心
- Ubuntu启动NFS出错出现错误* Not starting: portmapper is not running的解决方案
- HDU 3652 B-number(数位DP+记忆化搜索)
- linux(centos)搭建SVN服务器
- 广州自考全日制报名有哪些条件
- Jedis操作redis入门学习
- 其他软件烘培的光影贴图在unity中如何使用
- 关于abstract类及其子类顺序
- php中ob_start()系列函数的使用
- UIMenuContnroller的使用
- Android Studio学习之实用快捷键
- Centos 7 无法上网的解决办法
- SQL Server 导入大数据脚本
- Android 实用开源控件
- 搭建Maven私服——nexus
- eclipse中debug改变变量的值