| 시간 제한 | 메모리 제한 | 제출 | 정답 | 맞힌 사람 | 정답 비율 |
|---|---|---|---|---|---|
| 5 초 (추가 시간 없음) | 1024 MB | 76 | 54 | 38 | 70.370% |
The United Credit Finance (UCF) is running a simple scenario to see how many customers are happy with the company. UCF has one person (teller) serving the customers. Customers are numbered 1-n, and they arrive for service in sequential order, i.e., Customer 1 arrives first, then Customer 2, then Customer 3, etc. Also, no two customers arrive at the same time, i.e., Customer 2 will arrive later than Customer 1, Customer 3 will arrive later than Customer 2, etc. Customers are also processed in the order of arrival (i.e., not out of order).
As you might have noticed while waiting in a line, some customers get impatient and leave. Given the information about the UCF customers, you are to determine which customers are happy, i.e., they don’t leave before being processed.
The first input line contains an integer, n (1 ≤ n ≤ 103), indicating how many different customers are arriving. Each of the next n input lines contains the information about a customer as follows:
Print the happy customer numbers in sequential order (happy means they were processed, i.e., did not leave).
7 1 50 10 5 2 52 5 4 3 58 20 5 4 85 7 10 5 86 10 1 6 88 20 3 7 89 30 3
1 3 4 7