logo AlgoBeat OnlineJudge
登录 注册

#101252. [BZOJ 1252] SGU278 Fuel

内存限制:162 MiB 时间限制:10000 ms 标准输入输出
题目类型:传统 评测方式:文本比较
上传者: 匿名

题目描述

A fuel station has infinite amount of each of kinds of fuel. Each kind of fuel has density , cost and intensity . kilograms of such fuel has volume , intensity and costs dollars. Your car can store any mixture of different kinds of fuel such that the overall volume does not exceed . You have dollars. Your task is to determine the maximal overall intensity of the fuel you can buy. Note that you can buy any nonnegative amount of any kind of fuel, not necessarily an integer number of kilograms.

输入格式

The first line of the input contains three integers .Each of the next lines describes one kind of fuel. line contains three integers .

样例

样例输入 #1

2 3 3
1 2 1
2 1 1

样例输出 #1

2.000

数据范围与提示

对于所有的数据:

对于 的数据:

对于 的数据: