Robot Arms
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
Robot Arms
题目描述
有n个区间,第i个区间的范围是 。要求选择若干区间使其不重叠。求最多可以选择多少区间。
输入格式
第1行一个数 表示区间的个数。
接下来n行,每行2个数 表示一个区间,如题意描述。
输出格式
1个数,表示最大可以选择多少区间。
样例 #1
样例输入 #1
4
2 4
4 3
9 3
100 5
样例输出 #1
3
样例 #2
样例输入 #2
2
8 20
1 10
样例输出 #2
1
样例 #3
样例输入 #3
5
10 1
2 1
4 1
6 1
8 1
样例输出 #3
5
数据范围
- ()
- ()
- 时,
20240604集训
- Status
- Done
- Rule
- IOI
- Problem
- 6
- Start at
- 2024-6-4 18:30
- End at
- 2024-6-4 21:00
- Duration
- 2.5 hour(s)
- Host
- Partic.
- 17