QOJ.ac

QOJ

時間限制: 1 s 記憶體限制: 2048 MB 總分: 100

#8249. 每小时行数

统计

你是下一场 ICPC 区域赛的首席裁判,你希望确保参赛队伍在发挥出巅峰水平时,理论上有可能解决比赛中的所有题目。根据你的内部消息,你知道最强的队伍每小时能成功编写的代码行数有一个固定的上限。

你有一系列题目可供选择,并且你知道解决每道题目所需编写的代码行数。你记得区域赛的时长为五个小时。为了让最强的队伍有机会解决比赛中的所有题目,你最多可以在题集中放入多少道题目?

输入格式

输入的第一行包含两个整数 $n$ ($1 \le n \le 50$) 和 $lph$ ($1 \le lph \le 5,000$),其中 $n$ 是可供选择的候选题目数量,$lph$ 是最强队伍每小时能成功编写的代码行数。

接下来的 $n$ 行,每行包含一个整数 $loc$ ($1 \le loc \le 1,000$),表示解决该题目所需的代码行数。

输出格式

输出一个整数,表示为了让最强队伍有机会解决所有题目,题集中最多可以包含的题目数量。

样例

输入 1

10 100
30
300
1000
20
35
19
84
117
212
98

输出 1

7

Discussions

About Discussions

The discussion section is only for posting: General Discussions (problem-solving strategies, alternative approaches), and Off-topic conversations.

This is NOT for reporting issues! If you want to report bugs or errors, please use the Issues section below.

Open Discussions 0
No discussions in this category.

Issues

About Issues

If you find any issues with the problem (statement, scoring, time/memory limits, test cases, etc.), you may submit an issue here. A problem moderator will review your issue.

Guidelines:

  1. This is not a place to publish discussions, editorials, or requests to debug your code. Issues are only visible to you and problem moderators.
  2. Do not submit duplicated issues.
  3. Issues must be filed in English or Chinese only.
Active Issues 0
No issues in this category.
Closed/Resolved Issues 0
No issues in this category.