#P1855. 榨取kkksc03

    ID: 1032 远端评测题 1000ms 125MiB 尝试: 0 已通过: 0 难度: 3 上传者: 标签>动态规划,dp数学枚举,暴力背包

榨取kkksc03

Description

Luogu’s team features are hard for any other OJ or tool to match. With Luogu’s powerful server resources, any school can build an OJ on Luogu at zero cost and efficiently carry out its training plan.

Why call it building an OJ? Why is it efficient?

Because you can upload private problems that people outside the team cannot see. We can also help you with judging!

You can create assignments, assign tasks to team members, check their progress, and comment on any piece of code!

You can create contests! They can be in OI or ICPC format! They can be private within the team, public, or even limited to specified participants. This makes it perfect for running an “x school league.” With this feature, Luogu hopes to provide another platform for both public and private contests.

It is worth noting that this contest uses the mechanism of team private problems plus invitation contests.

The Luogu operations team has decided that if an OIer recommends Luogu to their coach and it is successfully used (successful use is defined as: the team has 2020 or more members, uploads at least 1010 private problems, has assigned at least one assignment, and has successfully held at least one public contest), then they can spend some of kkksc03’s time and money to fulfill one of their wishes.

kkksc03’s time and money are limited, so he cannot satisfy everyone’s wishes. Therefore, he wants to know, within his capacity, what is the maximum number of students’ wishes he can fulfill?

Input Format

The first line contains three integers nn, MM, TT, meaning there are nn wishes (1n1001 \le n \le 100), kkksc03 has MM yuan left (0M2000 \le M \le 200), and his summer vacation time is TT minutes (0T2000 \le T \le 200).

Lines 22 to n+1n+1 each contain mim_{i} and tit_{i}, representing the money and time required for the ii-th wish.

Output Format

One line with a single integer, the maximum number of wishes kkksc03 can fulfill.

6 10 10
1 1
2 3 
3 2
2 5
5 2
4 3
4

Hint

Translated by ChatGPT 5