要用数组动态规划+贪心/
// 2037 暑假
#include <iostream>
#include <vector>
#include <algorithm>
using namespace std;
const int N = 1000;
struct Time {
int a, b;
bool operator<(const Time& s)const
{
return a < s.a;
}
}times[N];
int main()
{
int n;
while(cin>>n,n)
{
for (int i = 1; i <= n; i++)
{
cin >> times[i].a >> times[i].b;
}
sort(times, times + n);
int cnt = 0;
for (int i = 1; i <= n; i++)
{
if
}
}
}