可以帮我看看吗???
#include <bits/stdc++.h>
using namespace std;
struct zombie{
int p,t;
}a[2005];
bool cmp(zombie A,zombie B)
{
if(A.p==B.p)
{
if(A.t>B.t)return false;
else return true;
}
else if(A.p<B.p)return true;
else return false;
}
int n,sum,b;
int main()
{
cin>>n;
for(int i=1;i<=n;i++)
cin>>a[i].p>>a[i].t;
sort(a+1,a+1+n,cmp);
for(int i=1;i<=n;i++)
{
if(a[i].p!=a[i-1].p||a[i].t-b>59||i==n)
{
sum++;
b=a[i].t;
}
}
cout<<sum;
return 0;
}