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

15331번 - Medical Checkup 다국어

시간 제한메모리 제한제출정답맞힌 사람정답 비율
2 초 512 MB163826651.163%

문제

Students of the university have to go for a medical checkup, consisting of lots of checkup items, numbered 1, 2, 3, and so on.

Students are now forming a long queue, waiting for the checkup to start. Students are also numbered 1, 2, 3, and so on, from the top of the queue. They have to undergo checkup items in the order of the item numbers, not skipping any of them nor changing the order. The order of students should not be changed either.

Multiple checkup items can be carried out in parallel, but each item can be carried out for only one student at a time. Students have to wait in queues of their next checkup items until all the others before them finish.

Each of the students is associated with an integer value called health condition. For a student with the health condition h, it takes h minutes to finish each of the checkup items. You may assume that no interval is needed between two students on the same checkup item or two checkup items for a single student.

Your task is to find the items students are being checked up or waiting for at a specified time t.

입력

The input consists of a single test case in the following format.

n t
h1
.
.
.
hn

n and t are integers. n is the number of the students (1 ≤ n ≤ 105). t specifies the time of our concern (0 ≤ t ≤ 109). For each i, the integer hi is the health condition of student i (1 ≤ hi ≤ 109).

출력

Output n lines each containing a single integer. The i-th line should contain the checkup item number of the item which the student i is being checked up or is waiting for, at (t+ 0.5) minutes after the checkup starts. You may assume that all the students are yet to finish some of the checkup items at that moment.

제한

예제 입력 1

3 20
5
7
3

예제 출력 1

5
3
2

예제 입력 2

5 1000000000
5553
2186
3472
2605
1790

예제 출력 2

180083
180083
180082
180082
180082

힌트

출처

ICPC > Regionals > Asia Pacific > Japan > ACM-ICPC Asia Tsukuba Regional Contest 2017 C번

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

출처

대학교 대회

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

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