Submission #993739

#TimeUsernameProblemLanguageResultExecution timeMemory
993739firewaterRailway Trip 2 (JOI22_ho_t4)C++14
Compilation error
0 ms0 KiB
#include "friend.h" #include<bits/stdc++.h> #define ll long long #define N 100100 using namespace std; // Find out best sample int x,f[N],g[N]; int findSample(int n,int confidence[],int host[],int protocol[]){ memset(f,0,sizeof(f)); memset(g,0,sizeof(g)); for(int i=0;i<n;++i) f[i]=confidence[i]; for(int i=n-1;i>0;--i){ x=host[i]; f[i]=max(f[i],g[i]); if(protocol[i]==0)f[x]+=g[i],g[x]+=f[i]; else if(protocol[i]==1)f[x]=max(f[x]+f[i],g[x]+f[i]),g[x]+=g[i]; else f[x]=max(f[x]+g[i],g[x]+f[i]),g[x]+=g[i]; } return max(f[0],g[0]); }

Compilation message (stderr)

Main.cpp:1:10: fatal error: friend.h: No such file or directory
    1 | #include "friend.h"
      |          ^~~~~~~~~~
compilation terminated.