F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

刷题计划

Time Limit: 10000/5000 MS (Java/Others)    Memory Limit: 65536/65536 K (Java/Others)
Total Submission(s): 565    Accepted Submission(s): 193


Problem Description
大赛将至,摆在你面前的是$n$道题目,第 $i(1\le i \le n)$ 道题目能提升 $a_{i}$ 点智力值,代码量为 $b_{i}$ KB,无聊值为 $c_{i}$ ,求至少提升$m$点智力值的情况下,所做题目代码量之和$*$无聊值之和最小为多少。

样例解释:

选择第1、3、4道题
 

Input
多组测试数据

第一行两个整数$n,m(0 < n\leq 400)$
接下来$n$行每行三个数,$a_{i},b_{i},c_{i}(0 < b_{i},c_{i}\leq 1000,0 < a_{i}\leq 800)$。
$0 < m\leq \sum a_{i}\leq 800$
 

Output
一个数,至少提升$m$点智力值的情况下,所做题目代码量之和$*$无聊值之和的最小值。
 

Sample Input
4 6 3 7 2 2 2 4 1 3 3 2 5 1
 

Sample Output
90
 

Source
 

Statistic | Submit | Discuss | Note
Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-22 16:24:21, Gzip enabled