Question
Could you please help identify what is wrong with my code? The output is not as instructed and I am stuck on this question. Thank
Could you please help identify what is wrong with my code? The output is not as instructed and I am stuck on this question. Thank you.
#include
using namespace std;
int main()
{
int n;
cin>>n;
int t[n],k[n],a[n][300005],nationality[300005]={0};
int z=0,j=0;
for(int i=0;i { cin>>t[i]; cin>>k[i]; for(int j=0;j { cin>>a[i][j]; nationality[a[i][j]-1]++; } while(t[i]-t[j]>=86400) { for(int x=0;x { nationality[a[j][x]-1]--; } j++; } int count=0; for(int z=0;z { if(nationality[z]>0) { count++; } } cout } return 0; }
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started