#K81137. Uncollected Treasures
Uncollected Treasures
Uncollected Treasures
You are given a total of N treasures and M team members. Each team member can collect at most one treasure. The treasures are located at various coordinates on the plane, though their exact positions do not affect the final outcome.
The number of uncollected treasures is computed by the formula:
$$N - \min(N, M)$$
If there are more team members than treasures (i.e. \(M \ge N\)), all treasures will be collected.
Write a program that reads the input from stdin
and outputs the number of uncollected treasures to stdout
.
inputFormat
The first line of input contains two integers N and M where N is the number of treasures and M is the number of team members.
The following N lines each contain two integers representing the coordinates of a treasure. These coordinates can be ignored in the computation.
outputFormat
Output a single integer that represents the number of uncollected treasures after each team member (up to M) collects one treasure.
## sample5 3
1 1
2 2
3 3
4 4
5 5
2