题解:
还是模拟(无聊啊!)。
没什么好说的,看程序吧!
var n,i,l,t,k,j,x,sum,ans:longint;
vis,a,time:array[0..300001]of longint;
begin
readln(n);
l:=1;
for
i:=1 to n do
begin
read(t,k);
for j:=1 to k do
begin
read(x);
inc(vis[x]);
if vis[x]=1 then inc(ans);
inc(sum);
a[sum]:=x;
time[sum]:=t;
end;
while time[l]<=t-86400 do
begin
dec(vis[a[l]]);
if vis[a[l]]=0 then dec(ans);
inc(l);
end;
writeln(ans);
end;
end.
时间: 2024-10-12 23:50:00