prog.cpp:2:5: error: ‘ll’ does not name a type
ll idx, dist, fee;
^~
prog.cpp:3:24: error: ‘ll’ has not been declared
Edge(int _idx = 0, ll _dist = 0, ll _fee = 0){
^~
prog.cpp:3:38: error: ‘ll’ has not been declared
Edge(int _idx = 0, ll _dist = 0, ll _fee = 0){
^~
prog.cpp: In constructor ‘Edge::Edge(int, int, int)’:
prog.cpp:4:9: error: ‘idx’ was not declared in this scope
idx = _idx; dist = _dist; fee = _fee;
^~~
prog.cpp:4:9: note: suggested alternative: ‘_idx’
idx = _idx; dist = _dist; fee = _fee;
^~~
_idx
prog.cpp:4:21: error: ‘dist’ was not declared in this scope
idx = _idx; dist = _dist; fee = _fee;
^~~~
prog.cpp:4:21: note: suggested alternative: ‘_dist’
idx = _idx; dist = _dist; fee = _fee;
^~~~
_dist
prog.cpp:4:35: error: ‘fee’ was not declared in this scope
idx = _idx; dist = _dist; fee = _fee;
^~~
prog.cpp:4:35: note: suggested alternative: ‘_fee’
idx = _idx; dist = _dist; fee = _fee;
^~~
_fee
prog.cpp: At global scope:
prog.cpp:9:1: error: ‘vector’ does not name a type
vector<Edge> adj[N];
^~~~~~
prog.cpp:12:1: error: ‘ll’ does not name a type
ll numGold[N], numFuel[N];
^~
prog.cpp: In function ‘void dfsGold(int, int, int)’:
prog.cpp:15:5: error: ‘numGold’ was not declared in this scope
numGold[u] = g;
^~~~~~~
prog.cpp:15:5: note: suggested alternative: ‘dfsGold’
numGold[u] = g;
^~~~~~~
dfsGold
prog.cpp:16:18: error: ‘adj’ was not declared in this scope
for(auto x : adj[u]) if(x.idx != p){
^~~
prog.cpp:17:24: error: ‘ll’ was not declared in this scope
int v = x.idx; ll fee = x.fee;
^~
prog.cpp:18:27: error: ‘fee’ was not declared in this scope
dfsGold(v, u, g + fee);
^~~
prog.cpp: At global scope:
prog.cpp:22:28: error: ‘ll’ has not been declared
void dfsFuel(int u, int p, ll g, ll d){
^~
prog.cpp:22:34: error: ‘ll’ has not been declared
void dfsFuel(int u, int p, ll g, ll d){
^~
prog.cpp: In function ‘void dfsFuel(int, int, int, int)’:
prog.cpp:23:5: error: ‘numFuel’ was not declared in this scope
numFuel[u] = d;
^~~~~~~
prog.cpp:23:5: note: suggested alternative: ‘dfsFuel’
numFuel[u] = d;
^~~~~~~
dfsFuel
prog.cpp:24:18: error: ‘adj’ was not declared in this scope
for(auto x : adj[u]) if(x.idx != p){
^~~
prog.cpp:25:24: error: ‘ll’ was not declared in this scope
int v = x.idx; ll fee = x.fee; ll w = x.dist;
^~
prog.cpp:25:42: error: expected ‘;’ before ‘w’
int v = x.idx; ll fee = x.fee; ll w = x.dist;
^~
;
prog.cpp:26:27: error: ‘fee’ was not declared in this scope
dfsFuel(v, u, g - fee, d + (g - fee)*w);
^~~
prog.cpp:26:46: error: ‘w’ was not declared in this scope
dfsFuel(v, u, g - fee, d + (g - fee)*w);
^
prog.cpp: In function ‘void solve()’:
prog.cpp:31:12: error: ‘cin’ was not declared in this scope
int q; cin >> q;
^~~
prog.cpp:36:27: error: ‘adj’ was not declared in this scope
for(auto &v : adj[x])
^~~
prog.cpp:38:27: error: ‘adj’ was not declared in this scope
for(auto &v : adj[y])
^~~
prog.cpp:44:13: error: ‘ll’ was not declared in this scope
ll gold = numGold[y] + g;
^~
prog.cpp:45:28: error: ‘gold’ was not declared in this scope
dfsFuel(x, -1, gold, 0);
^~~~
prog.cpp:45:28: note: suggested alternative: ‘void’
dfsFuel(x, -1, gold, 0);
^~~~
void
prog.cpp:46:13: error: ‘cout’ was not declared in this scope
cout << numFuel[y] << '\n';
^~~~
prog.cpp:46:21: error: ‘numFuel’ was not declared in this scope
cout << numFuel[y] << '\n';
^~~~~~~
prog.cpp:46:21: note: suggested alternative: ‘dfsFuel’
cout << numFuel[y] << '\n';
^~~~~~~
dfsFuel