#include "traffic.h"
#include <bits/stdc++.h>
using namespace std;
int LocateCentre(int n, int p[], int s[], int d[]){
vector<int> pref(n + 1);
f2(i, n, 0){
pref[i + 1] = p[i] + pref[i];
}
int ansa = 0, ma = pref[n];
f2(i, n + 1, 1){
int x = pref[i - 1];
int y = pref[n] - pref[i];
int t = max(x, y);
if(t < ma){
ansa = i - 1;
ma = t;
}
}
return ansa;
}
Compilation message
rings.cpp:1:10: fatal error: traffic.h: No such file or directory
1 | #include "traffic.h"
| ^~~~~~~~~~~
compilation terminated.