A8475 | Growing Mushrooms
时间限制1s
内存限制256MB
通过 / 提交0/0
题目描述
The first input line contains four integer numbers $n$ , $t_{1}$ , $t_{2}$ , $k$ $(1<=n,t_{1},t_{2}<=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 $a_{i}$ , $b_{i}$ $(1<=a_{i},b_{i}<=1000)$ — the speeds which the participant number $i$ chose.
Each of the following $n$ lines contains two integers. The $i$ -th $(1<=i<=n)$ line contains space-separated integers $a_{i}$ , $b_{i}$ $(1<=a_{i},b_{i}<=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$ .
C++ 编辑器
输入
输出
可保存默认模板;新题优先使用已保存模板。
当前快捷键仅展示,暂不支持修改。
- 撤销
Ctrl / ⌘ + Z - 重做
Ctrl / ⌘ + Y - 查找
Ctrl / ⌘ + F - 全选
Ctrl / ⌘ + A - 复制
Ctrl / ⌘ + C - 剪切
Ctrl / ⌘ + X - 粘贴
Ctrl / ⌘ + V - 自动排版
工具栏排版按钮 - 草稿保存
编辑时自动保存到本机
历史
提交记录
状态说明时间源码
AI
作答助手
你好,我是作答助手。可以问思路、复杂度、样例含义或代码报错原因;不会直接给出完整 AC 代码。
确定要清空代码吗?
提交通过
评测结果:Accepted