PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN
#GD0000105. Thành lập đội lập trình (Create The Teams)
HỌC THEO LỘ TRÌNH
1 lộ trìnhBài tập thuộc lộ trình
Mục lục đề ⌄
Đang đọc
Thành lập đội lập trình (Create The Teams)
Create The Teams
Source: Codeforces
Version: Phuoc Hung OJ Extended
Problem Statement
There are programmers with skill values . Form as many nonempty, disjoint teams as possible. A team is valid when its size times its minimum member skill is at least . You may leave some programmers unused.
Input
Line 1 contains . Line 2 contains skills .
Output
Print the maximum number of valid teams.
Subtasks
- Subtask 1 (20 points): ; ; for every .
- Subtask 2 (30 points): ; ; for every .
- Subtask 3 (50 points): ; ; for every .
Examples
Input
5 10
7 11 2 9 5
Output
2
Explanation
The skill- programmer forms one team, while programmers of skills and form another with strength . A third valid team cannot be formed.