Nội dung Bài tập
- Mã:
- OLP19.Cau4.TimeLimits
- Tên:
- Cau4.TimeLimits
- Dạng thi:
- oi
- Thang điểm:
- 100 điểm
- Giới hạn thời gian:
- 1 giây
- Giới hạn bộ nhớ:
- 256 MB
- Được tạo bởi:
- thuthq
A contest setter wants to determine the time limits for a given problem. There are n model solutions, and solution k takes tk milliseconds to run on the test data. The contest setter wants the time limit to be an integer number of seconds, and wants the time limit to be at least s times larger than the slowest model solution. Compute the minimum time limit the contest setter can set.
Input
The first line of input contains two space-separated integers n and s (1 <= n <= 100 and 1 <= s <= 20).The second line of input contains n space-separated integers t1, ..., tn (1 <= tk <= 2000 for allk = 1, ..., n).
Output
Print, on one line, the minimum time limit (in seconds) as a single integer.
Sample Input and Output:
Input
Output
2 5
200 250
2
Input
Output
3 4
47 1032 1107
5
Theme :
Mời bạn soạn code
Ai có thể xem bài này :
Thông tin
Phần thảo luận