P1855 Squeezing 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? ![](https://cdn.luogu.com.cn/upload/pic/1236.png) 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. ![](https://cdn.luogu.com.cn/upload/pic/1237.png) 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 $20$ or more members, uploads at least $10$ 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 $n$, $M$, $T$, meaning there are $n$ wishes ($1 \le n \le 100$), kkksc03 has $M$ yuan left ($0 \le M \le 200$), and his summer vacation time is $T$ minutes ($0 \le T \le 200$). Lines $2$ to $n+1$ each contain $m_{i}$ and $t_{i}$, representing the money and time required for the $i$-th wish.

Output Format

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

Explanation/Hint

Translated by ChatGPT 5