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

建议使用的浏览器:

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

3478:Undergraduate Instruction Evaluation

题目描述

Inspectors from the Ministry of Education are coming to frkstyc’s university to evaluate its undergraduate instruction. Although the university is among the best ones in the country, the dean office rules that there is still room for improvement. Now they have produced a list of points of possible improvement, such as trimming the trees and lawns on the campus and lowering the rate of late arrivals at classes.

Improvement is good, whereas overdoing that is not. Nicely tidied dormitories are certainly eyeball-catching. But if they gets extravagantly decorated, they will be dimmed solely as evidence of affectation for sure. With the evaluation program in hand, the dean office has to decide how much effort to spend on each point of improvement so that the university will score in extra as high as possible without the inspectors perceiving any pretence.

输入解释

The input consists of a single test case. The first line contains two integers m and n (1 ≤ m ≤ 4000, 1 ≤ n ≤ 200). The next m lines each contain a pair of integers xi and yi (1 ≤ xiyin). The first of the remaining two lines contains n integers bi (0 ≤ bi ≤ 2000); the second contains m integers ci (0 ≤ ci2 000 000).

The input is interpreted as follows. The dean office has listed n points to improve, from which arise m sources of possible recognizable affectation. Since the points are appropriately grouped into categories, these sources of troubles can be describe economically: for each i = 1, 2, …, m, if the score increases from points numbered xi through yi (inclusive) sum to over ci, some inspector will believe what he/she has seen is deliberate and unnatural. The total extra score is calculated as the weighted sum of score increase in each point with the bi’s as the weights.

输出解释

Output the highest possible total extra score. It is guaranteed to be bounded.

输入样例
5 4
2 4
1 4
3 4
1 1
1 2
5 12 10 6
1 1 1 1 1
输出样例
12
提示

If two linear programs

minimize cTx

subject to

Axb,
x0

and

maximize bTy

subject to

ATyc,
y0

are both feasible, then x* and y*, the optimal solutions to them respectively, satisfy that cTx = bTy.


该题目是Virtual Judge题目,来自 北京大学POJ

源链接: POJ-3478

最后修改于 2020-10-29T07:02:34+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
2000 131072