商店
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Description
有 名同学去逛商店,店里有 个物品,第 人有 块钱,第 个物品价格 元。
每个人至多买一个物品,每个物品只能被买一次,问最多有多少人能买到物品。
Format
Input
输入共 行。
第 行输入 个正整数 。
第 行输入 个整数 , 表示第 人的钱。
第 行输入 个整数 , 表示第 个物品的价格。
Output
一行一个整数表示答案
Samples
样例输入
15 20
4 3 9 10 7 7 5 3 6 1 8 6 6 1 5
12 4 1 9 8 5 8 6 4 5 18 8 14 9 9 7 20 11 8 19
样例输出
10
Limitation
对于数据,,。
对于所有数据,,。
20250515周赛
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2025-5-29 16:45
- End at
- 2025-5-29 18:15
- Duration
- 1.5 hour(s)
- Host
- Partic.
- 23