Submission #584877

#TimeUsernameProblemLanguageResultExecution timeMemory
584877BelguteiGondola (IOI14_gondola)C++17
Compilation error
0 ms0 KiB
#include "friend.h" #include <bits/stdc++.h> using namespace std; #define ll long long #define ff first #define ss second #define pb push_back #define mk make_pair const int N = 2005; vector<int> v; vector<int> edge[N]; int val[N]; bool visited[N]; int orson[N]; int oroogui[N]; void dfs(int k) { visited[k] = 1; for(auto x: edge[k]) { if(visited[x] == 1) continue; dfs(x); orson[k] += oroogui[x]; oroogui[k] += max(orson[x], oroogui[x]); } orson[k] += val[k]; } // Find out best sample int findSample(int n, int confidence[], int host[], int protocol[]){ // subtask 4 I am your friend for(int i = 1; i < n; i ++) { // host[i] / protocol[i] edge[i].pb(host[i]); edge[host[i]].pb(i); } for(int i = 0; i < n; i ++) val[i] = confidence[i]; dfs(0); return max(orson[0], oroogui[0]); }

Compilation message (stderr)

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