A Wine and Four Dishes
已放洛谷https://www.luogu.com.cn/problem/T443735
但是数据点不够全面欢迎大家私信我或者评论,帮助我增加数据点
题目背景
2022年zcpc M题目
题目描述
Teacher Rice has prepared a feast for himself. The feast contains x bottles of wine and y dishes, which
means he needs x cups and y plates.
There are n boxes. The i-th box contains ai cups and bi plates. Please help Teacher Rice to determine the
minimum number of boxes he has to open so that he can collect enough cups and plates. If it is impossible
for Teacher Rice to collect enough cups or plates, output “IMPOSSIBLE” instead.
输入格式
The first line contains three integers n, x, y (1 ≤ n ≤ 32, 0 ≤ x ≤ 1, 0 ≤ y ≤ 4).
The i-th of the following n lines contains two integers ai
, bi (0 ≤ ai ≤ 1, 0 ≤ bi ≤ 4).
输出格式
Output the minimum number of b