2014-2015 ACM-ICPC, NEERC, Moscow Subregional Contest C. CIA Datacenter

时间:2022-04-15 20:18:18
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 AB 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。
很简单的题目,不过细节较多。