CF186B.Growing Mushrooms
普及/提高-
通过率:0%
AC君温馨提醒
该题目为【codeforces】题库的题目,您提交的代码将被提交至codeforces进行远程评测,并由ACGO抓取测评结果后进行展示。由于远程测评的测评机由其他平台提供,我们无法保证该服务的稳定性,若提交后无反应,请等待一段时间后再进行重试。
题目描述
The first input line contains four integer numbers n , t1 , t2 , k (1<=n,t1,t2<=1000; 1<=k<=100) — the number of participants, the time before the break, the time after the break and the percentage, by which the mushroom growth drops during the break, correspondingly.
Each of the following n lines contains two integers. The i -th (1<=i<=n) line contains space-separated integers ai , bi (1<=ai,bi<=1000) — the speeds which the participant number i chose.
输入格式
Print the final results' table: n lines, each line should contain the number of the corresponding dwarf and the final maximum height of his mushroom with exactly two digits after the decimal point. The answer will be considered correct if it is absolutely accurate.
输出格式
- First example: for each contestant it is optimal to use firstly speed 2 and afterwards speed 4, because 2·3·0.5+4·3>4·3·0.5+2·3 .
输入输出样例
输入#1
2 3 3 50 2 4 4 2
输出#1
1 15.00 2 15.00
输入#2
4 1 1 1 544 397 280 101 280 101 693 970
输出#2
4 1656.07 1 937.03 2 379.99 3 379.99
说明/提示
- First example: for each contestant it is optimal to use firstly speed 2 and afterwards speed 4, because 2·3·0.5+4·3>4·3·0.5+2·3 .