这道题全部RE了 以下是代码:
#include<iostream>
#include<cstring>
using namespace std;
int main()
{
bool country[100000] {0};
struct ship{
long long t;
int num;
int pass[100000];
}s[100000];
int no,m=0;
cin>>no;
for (int i=1;i<=no;i++) {
cin>>s[i].t;
cin>>s[i].num;
for (int j=0;j<=s[i].num;j++) cin>>s[i].pass[j];
}
for (int i=1;i<=no;i++) {
m=0;
for (int j=1;j<=i;j++) {
if (s[i].t-s[j].t<=86400) {
for (int k=0;k<=s[j].num;k++) country[s[j].pass[k]]=true;
}
}
for (int j=1;j<=100000;j++) if (country[j]==true) m++;
cout<<m<<endl;
}
return 0;
}
求助大佬! PS:编译器显示 [Warning] extended initializer lists only available with -std=c++11 or -std=gnu++11