0pts不知道哪错了
查看原帖
0pts不知道哪错了
1017488
i_b_color_IronMan楼主2024/10/20 13:32
#include<bits/stdc++.h>
using namespace std;
int n,k; 
struct haigang{
	int x[10005]={0},t,sum,pai[10005]={0}; 
}a;
queue<haigang> h;
queue<haigang> g;

int main(){
	cin>>n;
	for(int d=0;d<n;d++){
		cin>>a.t>>k;
		for(int i=0;i<k;i++){
			cin>>a.x[i];
		}
		h.push(a);
		for(int i=0;i<k;i++){
			a.x[i]=0;
		} 
	}
	for(int i=0;i<n;i++){
		if(h.front().pai[0]!=0 && h.front().pai[h.front().x[i]]!=1){
			h.front().pai[h.front().x[i]]=1;
			h.front().sum++;
		}
	
		a=h.front();
		h.pop();
		g.push(a);
	}
	cout<<g.front().sum<<endl;
	a=g.front();
	g.pop();
	for(int i=1;i<n;i++){
		if(g.front().t-a.t>=86400){
			cout<<g.front().sum-a.sum<<endl;
			a=g.front();
			g.pop(); 
		}
		else{
			cout<<g.front().sum<<endl;
			a=g.front();
			g.pop(); 
		}
	}
	return 0; 
}

请求dalao帮助QAQ

2024/10/20 13:32
加载中...