蒟蒻代码求调qwq
#include<bits/stdc++.h>
using namespace std;
int main(){
int a[7][2004] = {0};
bool x[7] = {0};
int l1[7] = {0};
int i,n,p,t,s = 0;
cin >> n;
for(i = 1;i <= n;i ++){
cin >> p >> t;
x[p] = 1;
l1[p]++;
a[p][l1[p]] = t;
}
for(i = 1;i <= 6;i ++){
sort(a[i]+1,a[i]+l1[i]);
}
int l2[7] = {1};
for(i = 1;i <= 6;i ++){
for(int j = 1;j <= l1[i];j ++){
if(a[i][j] - a[i][l2[i]] >= 60){
s++;
l2[i] = j + 1;
j++;
}
}
}
for(i = 1;i <= 6;i ++){
if(x[i]){
s++;
}
}
cout << s;
return 0;
}