Pku3245 Sequence Partitioning

时间限制:8s      空间限制:64MB

题目描述


输入格式


输出格式


样例输入

4 6
4 3
3 5
2 5
2 4

样例输出

9

提示

An available assignment is the first two pairs are assigned into the first part and the last two pairs are assigned into the second part. Then B1 > A3, B1 > A4, B2 > A3, B2 > A4, max{A1, A2}+max{A3, A4} ≤ 6, and minimum max{B1+B2, B3+B4}=9.


题目来源

没有写明来源

Menuappsclose