BUSYMAN - I AM VERY BUSY

题意翻译

## 题目描述 ##### 我很忙 你确实是个大忙人,你有很多活动安排,而你的目标是尽可能多的进行活动。 如果你与人约会,你就不能参加编程竞赛(NOIP?)也不能看电影;如果你玩[DotA](https://baike.baidu.com/item/dota/32506),你就不能复习明天要考试的内容;如果你复习明天要考试的内容,你就不能安然入睡。 你可以看电影,玩DotA,安静地睡觉 or 与人约会,玩DotA并安静地睡觉 ## 输入格式 第一行包含整数T,即测试样例的数量。对于每个测试用例,第一行由整数N(活动数)组成。然后接下来的N行包含两个整数m和n,即每个活动的开始和结束时间。 1 <= T <= 10 1 <= N <= 100000 0 <= start <end <= 1000000 ## 输出格式 对于每个测试用例,找到您可以执行的最大活动数。

题目描述

I AM VERY BUSY -------------- You are actually very busy man. You have a big schedule of activities. Your aim is to do as much as activities as possible. ![](https://cdn.luogu.com.cn/upload/vjudge_pic/SP11515/3fe61af8930b343b648aad3a86ff3f6e50aaae90.png) In the given figure, if you go to date with crush, you cannot participate in the coding contest and you can’t watch the movie. Also if you play DotA, you can’t study for the exam. If you study for the exam you can’t sleep peacefully. The maximum number of activities that you can do for this schedule is 3. Either you can - watch movie, play DotA and sleep peacefully (or) - date with crush, play DotA and sleep peacefully

输入输出格式

输入格式


输出格式


输入输出样例

输入样例 #1

(empty lines just for clarity)
3
3
3 9
2 8
6 9

4
1 7
5 8
7 8
1 8

6
7 9
0 10
4 5
8 9
4 10
5 7

输出样例 #1

1
2
3