Logo
(追記) (追記ここまで)

31307번 - Lines Per Hour 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 1024 MB123938477.064%

문제

You are the chief judge for the next ICPC regional contest, and you want to make sure that it is theoretically possible for a team to solve all problems in the contest, but only if they are performing at their peak skill. With your insider knowledge, you know that the best team has a fixed limit on the number of lines of code per hour that they can successfully write.

You have a number of problems to select among and you know that each problem has a number of lines of code that would be required to solve it. You remember that regional contests are five hours long. What is the maximum number of problems you can put in the problem set so that the best team has a chance of solving all of the problems in the contest?

입력

The first line of input contains two integers $n$ (1ドル \le n \le 50$) and $lph$ (1ドル \le lph \le 5,000円$), where $n$ is the number of candidate problems to choose from, and $lph$ is the lines of code per hour that the best team can successfully write.

Each of the next $n$ lines contains a single integer $loc$ (1ドル \le loc \le 1,000円$), which is the number of lines of code required to solve that problem.

출력

Output a single integer, which is the maximum number of problems that can be put in the problem set so that the best team has a chance to solve all of the problems.

제한

예제 입력 1

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

예제 출력 1

7

힌트

출처

ICPC > Regionals > North America > North America Qualification Contest > ICPC North America Qualifier 2023 G번

(追記) (追記ここまで)

출처

대학교 대회

  • 사업자 등록 번호: 541-88-00682
  • 대표자명: 최백준
  • 주소: 서울시 서초구 서초대로74길 29 서초파라곤 412호
  • 전화번호: 02-521-0487 (이메일로 연락 주세요)
  • 이메일: contacts@startlink.io
  • 통신판매신고번호: 제 2017-서울서초-2193 호

AltStyle によって変換されたページ (->オリジナル) /