garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:6:4: error: 'vector' was not declared in this scope
vector<int> deg(N);
^~~~~~
garden.cpp:6:11: error: expected primary-expression before 'int'
vector<int> deg(N);
^~~
garden.cpp:7:11: error: expected primary-expression before 'int'
vector<int> best(N, -1);
^~~
garden.cpp:10:12: error: 'deg' was not declared in this scope
++deg[R[i][z]];
^~~
garden.cpp:11:14: error: 'best' was not declared in this scope
if (best[R[i][z]] == -1) best[R[i][z]] = i;
^~~~
garden.cpp:14:11: error: expected primary-expression before 'int'
vector<int> nxt(N * 2, -1);
^~~
garden.cpp:18:14: error: 'best' was not declared in this scope
if (best[R[i][!z]] == i && deg[R[i][!z]] > 1) to += N;
^~~~
garden.cpp:18:37: error: 'deg' was not declared in this scope
if (best[R[i][!z]] == i && deg[R[i][!z]] > 1) to += N;
^~~
garden.cpp:19:14: error: 'nxt' was not declared in this scope
if (nxt[R[i][z]] == -1) nxt[R[i][z]] = to;
^~~
garden.cpp:23:18: error: expected primary-expression before 'int'
vector<vector<int>> adj(2 * N);
^~~
garden.cpp:25:7: error: 'adj' was not declared in this scope
adj[nxt[i]].emplace_back(i);
^~~
garden.cpp:25:11: error: 'nxt' was not declared in this scope
adj[nxt[i]].emplace_back(i);
^~~
garden.cpp:26:11: error: 'deg' was not declared in this scope
if (deg[i] > 1) adj[nxt[i + N]].emplace_back(i + N);
^~~
garden.cpp:28:11: error: 'pair' was not declared in this scope
vector<pair<int, int>> qs;
^~~~
garden.cpp:28:16: error: expected primary-expression before 'int'
vector<pair<int, int>> qs;
^~~
garden.cpp:29:32: error: 'qs' was not declared in this scope
for (int i = 0; i < Q; ++i) qs.emplace_back(G[i], i);
^~
garden.cpp:30:9: error: 'qs' was not declared in this scope
sort(qs.begin(), qs.end());
^~
garden.cpp:30:4: error: 'sort' was not declared in this scope
sort(qs.begin(), qs.end());
^~~~
garden.cpp:30:4: note: suggested alternative: 'short'
sort(qs.begin(), qs.end());
^~~~
short
garden.cpp:31:11: error: expected primary-expression before 'int'
vector<int> ans(Q);
^~~
garden.cpp: In lambda function:
garden.cpp:33:14: error: expected primary-expression before 'int'
vector<int> dist(2 * N, -1);
^~~
garden.cpp:34:14: error: expected primary-expression before 'int'
vector<int> q;
^~~
garden.cpp:35:7: error: 'dist' was not declared in this scope
dist[start] = 0;
^~~~
garden.cpp:35:7: note: suggested alternative: 'int'
dist[start] = 0;
^~~~
int
garden.cpp:36:7: error: 'q' was not declared in this scope
q.emplace_back(start);
^
garden.cpp:39:23: error: 'adj' was not declared in this scope
for (int u : adj[v]) if (dist[u] == -1) {
^~~
garden.cpp:44:14: error: expected primary-expression before 'int'
vector<int> dists;
^~~
garden.cpp:45:20: error: unable to deduce 'auto&&' from 'q'
for (int v : q) if (v < N) dists.emplace_back(dist[v]);
^
garden.cpp:45:34: error: 'dists' was not declared in this scope
for (int v : q) if (v < N) dists.emplace_back(dist[v]);
^~~~~
garden.cpp:47:14: error: expected primary-expression before 'bool'
vector<bool> visited(2 * N);
^~~~
garden.cpp:49:15: error: 'visited' was not declared in this scope
while (!visited[v]) {
^~~~~~~
garden.cpp:51:14: error: 'nxt' was not declared in this scope
v = nxt[v];
^~~
garden.cpp:55:14: error: expected primary-expression before 'int'
vector<int> cnts(2 * N);
^~~
garden.cpp:58:27: error: 'dists' was not declared in this scope
while (ptr < int(dists.size()) && dists[ptr] <= qs[i].first) {
^~~~~
garden.cpp:61:15: error: 'cnts' was not declared in this scope
++cnts[cur];
^~~~
garden.cpp:61:15: note: suggested alternative: 'int'
++cnts[cur];
^~~~
int
garden.cpp:65:27: error: 'ans' was not declared in this scope
if (cur < 2 * N) ans[qs[i].second] += cnts[cur];
^~~
garden.cpp:65:48: error: 'cnts' was not declared in this scope
if (cur < 2 * N) ans[qs[i].second] += cnts[cur];
^~~~
garden.cpp:65:48: note: suggested alternative: 'int'
if (cur < 2 * N) ans[qs[i].second] += cnts[cur];
^~~~
int
garden.cpp: In function 'void count_routes(int, int, int, int (*)[2], int, int*)':
garden.cpp:69:8: error: 'deg' was not declared in this scope
if (deg[P] > 1) go(P + N);
^~~
garden.cpp:70:39: error: 'ans' was not declared in this scope
for (int i = 0; i < Q; ++i) answer(ans[i]);
^~~