当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5855:Less Time, More profit

题目描述
The city planners plan to build N plants in the city which has M shops.

Each shop needs products from some plants to make profit of $pro_i$ units.

Building ith plant needs investment of $pay_i$ units and it takes $t_i$ days.

Two or more plants can be built simultaneously, so that the time for building multiple plants is maximum of their periods($t_i$).

You should make a plan to make profit of at least L units in the shortest period.
输入解释
First line contains T, a number of test cases.

For each test case, there are three integers N, M, L described above.

And there are N lines and each line contains two integers $pay_i$, $t_i$(1<= i <= N).

Last there are M lines and for each line, first integer is $pro_i$, and there is an integer k and next k integers are index of plants which can produce material to make profit for the shop.

1 <= T <= 30
1 <= N, M <= 200
$1 \leq L, t_i \leq 1000000000$
$1 \leq pay_i, pro_i \leq 30000$
输出解释
For each test case, first line contains a line “Case #x: t p”, x is the number of the case, t is the shortest period and p is maximum profit in t hours. You should minimize t first and then maximize p.

If this plan is impossible, you should print “Case #x: impossible”
输入样例
2

1 1 2
1 5
3 1 1

1 1 3
1 5
3 1 1
输出样例
Case #1: 5 2
Case #2: impossible
来自杭电HDUOJ的附加信息
Author 金策工业综合大学(DPRK)
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5855

最后修改于 2020-10-25T23:26:12+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000/1000MS(Java/Others) 65536/65536K(Java/Others)