#P10728. [NOISG 2023 Qualification] Swords
[NOISG 2023 Qualification] Swords
Problem Description
YH has swords. The -th sword has attack power and defense ability .
For a sword , if there exists a such that and , then YH considers this sword useless. Otherwise, he considers it useful.
In this problem, it is guaranteed that it is impossible to find two swords such that and .
Please help YH find the number of useful swords among these swords.
Input Format
The first line contains an integer .
The next lines each contain two integers , representing the attack power and defense ability of the -th sword.
Output Format
Print one integer, the number of useful swords.
3
2 3
1 3
5 3
1
4
5 6
2 5
6 9
1 3
1
Hint
| Score | Special Property | |
|---|---|---|
| For every , | ||
| None |
For all testdata, , .
Translated by ChatGPT 5