//
// main.cpp
// 海港
//
// Created by aa on 2022/12/29.
//
#include<iostream>
#include<queue>
#include<algorithm>
using namespace std;
int con[1000000];
const int second=86400;
struct data{
int a,nat;
};
int main(){
std::ios::sync_with_stdio(0);
cin.tie(0); cout.tie(0);
queue<data> q;
int n,temp,ans=0,k,t;
cin>>n;
while(n--){
cin>>temp>>k;
while(q.size()){
data h=q.front();
if(temp-h.a>=second){
con[h.nat]--;
if(con[h.nat]<=0){
ans--;
}
q.pop();
}else{
break;
}
}
for(int i=1;i<=k;i++){
cin>>t;
data x;
x.a=temp;
x.nat=t;
q.push(x);
con[x.nat]++;
if(con[x.nat]==1){
ans++;
}
}
cout<<ans<<endl;
}
return 0;
}
这个代码为什么会ce
我用Xcode