# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
958245 | 2024-04-05T08:25:45 Z | Basexal | Amusement Park (JOI17_amusement_park) | C++17 | Compilation error |
0 ms | 0 KB |
#include "Joi.h" void dfs(int v, int& t, int mp, std::vector<int>& tin, std::vector<int>& used, std::vector<int>& p, const std::vector<std::vector<int>>& g, std::vector<std::vector<int>>& childs, std::vector<int>& sz) { tin[v] = t++; p[v] = mp; sz[v] = 1; if (t >= BITS) { t -= BITS; } used[v] = 1; for (auto& u : g[v]) { if (used[u] == 0) { childs[v].push_back(u); dfs(u, t, v, tin, used, p, g, childs, sz); sz[v] += sz[u]; } } } void Joi(int N, int M, int A[], int B[], long long x, int T) { std::vector<std::vector<int>> g(N); for (int i = 0; i < M; ++i) { g[A[i]].push_back(B[i]); g[B[i]].push_back(A[i]); } std::vector<int> tin(N), used(N), p(N), sz(N); int t = 0; std::vector<std::vector<int>> childs(N); dfs(0, t, 0, tin, used, p, g, childs, sz); for (int i = 0; i < N; ++i) { MessageBoard(i, (x >> tin[i]) & 1); } return; }
#include "Ioi.h" const int BITS = 60; int Mov(int u) { return Move(u); } void dfs(int v, int& t, int mp, std::vector<int>& tin, std::vector<int>& used, std::vector<int>& p, const std::vector<std::vector<int>>& g, std::vector<std::vector<int>>& childs, std::vector<int>& sz) { tin[v] = t++; p[v] = mp; sz[v] = 1; if (t >= BITS) { t -= BITS; } used[v] = 1; for (auto& u : g[v]) { if (used[u] == 0) { childs[v].push_back(u); dfs(u, t, v, tin, used, p, g, childs, sz); sz[v] += sz[u]; } } } void dfs_down(int v, long long val, long long& ans, const std::vector<std::vector<int>>& childs, std::vector<int>& getted, const std::vector<int>& tin) { getted[tin[v]] += 1; getted[tin[v] + BITS] += 1; ans += val << tin[v]; for (auto& u : childs[v]) { if (getted[tin[u]] == 0) { long long new_val = Mov(u); dfs_down(u, new_val, ans, childs, getted, tin); Mov(v); } } } void dfs2(int v, int& t, std::vector<int>& tin, std::vector<int>& tout, const std::vector<std::vector<int>>& childs) { tin[v] = t++; for (auto& u : childs[v]) { dfs2(u, t, tin, tout, childs); } tout[v] = t - 1; } void dfs_twice(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { ans += val << tin[v]; getted[tin2[v]] += 1; for (auto& u : childs[v]) { int qql = tin2[u], qqr = std::min(tout2[u], qr); if (qql > qr) { break; } if ((l <= qql && qqr <= r) || (l <= qql + BITS && qqr + BITS <= r)) { continue; } long long new_val = Mov(u); dfs_twice(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); Mov(v); } } void dfs_once(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { if (getted[tin2[v]] == 0) { ans += val << tin[v]; getted[tin2[v]] += 1; } int last = -1; for (auto& u : childs[v]) { int qql = tin2[u], qqr = std::min(tout2[u], qr); if (qql > qr) { break; } if ((l <= qql && qqr <= r) || (l <= qql + BITS && qqr + BITS <= r)) { continue; } if ((qql <= r && r < qqr) || (qql + BITS <= r && r < qqr + BITS)) { last = u; } else { long long new_val = Mov(u); dfs_twice(u, new_val, ans, l, r, ql, qr, childs, tin2, tout2, tin, getted); Mov(v); } } if (last != -1) { int u = last; long long new_val = Mov(u); int qql = tin2[u], qqr = std::min(tout2[u], qr); dfs_once(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); } } void get_h(int v, int qr, const std::vector<std::vector<int>>& childs, std::vector<int>& h, std::vector<int>& tin2) { h[v] = 0; for (auto& u : childs[v]) { if (tin2[u] > qr) { break; } get_h(u, qr, childs, h, tin2); h[v] = std::max(h[v], h[u] + 1); } } int get_str(int v, const std::vector<std::vector<int>>& childs, const std::vector<int>& sz, const std::vector<int>& p, std::vector<int>& h) { int cur_p = -1, k = 0; while (sz[v] < BITS) { cur_p = v; v = p[v]; k++; } if (cur_p == -1) { return -1; } std::vector<int> tin2(h.size()), tout2(h.size()); int t = 0; dfs2(v, t, tin2, tout2, childs); get_h(v, tin2[v] + BITS - 1, childs, h, tin2); if (h[v] < 10) { return -1; } else { return 1; } } void dfs_ans(int v, int qr, long long val, long long& ans, std::v ector<int>& h, std::vector<int>& tin2, std::vector<int>& getted, const std::vector<std::vector<int>>& childs) { ans += val << tin2[v] % BITS; int last = -1; for (auto& u : childs[v]) { if (tin2[u] > qr) { break; } if (h[u] == h[v] - 1 && last == -1) { last = u; } else { long long new_val = Mov(u); dfs_ans(u, qr, new_val, ans, h, tin2, getted, childs); Mov(v); } } if (last != -1) { long long new_val = Mov(last); dfs_ans(last, qr, new_val, ans, h, tin2, getted, childs); } } long long Ioi(int N, int M, int A[], int B[], int P, int V, int T) { std::vector<std::vector<int>> g(N); for (int i = 0; i < M; ++i) { g[A[i]].push_back(B[i]); g[B[i]].push_back(A[i]); } std::vector<int> tin(N), used(N), p(N), sz(N), h(N); int t = 0; std::vector<std::vector<int>> childs(N); dfs(0, t, 0, tin, used, p, g, childs, sz); int str = get_str(P, childs, sz, p, h); std::vector<int> getted(2 * BITS); if (str != 0) { int cur_v = P, cur_p = -1; long long cur_val = V, ans = 0; while (sz[cur_v] < BITS) { dfs_down(cur_v, cur_val, ans, childs, getted, tin); cur_p = cur_v; cur_v = p[cur_v]; cur_val = Mov(cur_v); } CNT_ONCE = h[cur_v]; if (cur_p != -1) { int k = tin[cur_v]; int l = tin[cur_p]; if (l < k) { l += BITS; } std::vector<int> tin2(N), tout2(N); t = k; dfs2(cur_v, t, tin2, tout2, childs); int r = l + tout2[cur_p] - tin2[cur_p]; dfs_once(cur_v, cur_val, ans, l, r, k, k + BITS - 1, childs, tin2, tout2, tin, getted); } else { int k = tin[cur_v]; int l = -1; std::vector<int> tin2(N), tout2(N); t = k; dfs2(cur_v, t, tin2, tout2, childs); int r = -1; dfs_twice(cur_v, cur_val, ans, l, r, k, k + BITS - 1, childs, tin2, tout2, tin, getted); } return ans; } else { fl = true; int cur_v = P; long long cur_val = V, ans = 0; while (sz[cur_v] < BITS) { cur_v = p[cur_v]; cur_val = Mov(cur_v); } std::vector<int> tin2(N), tout2(N); t = tin[cur_v]; dfs2(cur_v, t, tin2, tout2, childs); dfs_ans(cur_v, tin[cur_v] + BITS - 1, cur_val, ans, h, tin2, getted, childs); return ans; } }
Compilation message
Joi.cpp:3:33: error: 'std::vector' has not been declared 3 | void dfs(int v, int& t, int mp, std::vector<int>& tin, std::vector<int>& used, std::vector<int>& p, const std::vector<std::vector<int>>& g, std::vector<std::vector<int>>& childs, std::vector<int>& sz) { | ^~~ Joi.cpp:3:44: error: expected ',' or '...' before '<' token 3 | void dfs(int v, int& t, int mp, std::vector<int>& tin, std::vector<int>& used, std::vector<int>& p, const std::vector<std::vector<int>>& g, std::vector<std::vector<int>>& childs, std::vector<int>& sz) { | ^ Joi.cpp: In function 'void dfs(int, int&, int, int)': Joi.cpp:4:5: error: 'tin' was not declared in this scope 4 | tin[v] = t++; | ^~~ Joi.cpp:5:5: error: 'p' was not declared in this scope 5 | p[v] = mp; | ^ Joi.cpp:6:5: error: 'sz' was not declared in this scope 6 | sz[v] = 1; | ^~ Joi.cpp:7:14: error: 'BITS' was not declared in this scope 7 | if (t >= BITS) { | ^~~~ Joi.cpp:10:5: error: 'used' was not declared in this scope 10 | used[v] = 1; | ^~~~ Joi.cpp:11:20: error: 'g' was not declared in this scope 11 | for (auto& u : g[v]) { | ^ Joi.cpp:13:13: error: 'childs' was not declared in this scope 13 | childs[v].push_back(u); | ^~~~~~ Joi.cpp: In function 'void Joi(int, int, int*, int*, long long int, int)': Joi.cpp:21:10: error: 'vector' is not a member of 'std' 21 | std::vector<std::vector<int>> g(N); | ^~~~~~ Joi.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 1 | #include "Joi.h" +++ |+#include <vector> 2 | Joi.cpp:21:22: error: 'vector' is not a member of 'std' 21 | std::vector<std::vector<int>> g(N); | ^~~~~~ Joi.cpp:21:22: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? Joi.cpp:21:29: error: expected primary-expression before 'int' 21 | std::vector<std::vector<int>> g(N); | ^~~ Joi.cpp:23:9: error: 'g' was not declared in this scope 23 | g[A[i]].push_back(B[i]); | ^ Joi.cpp:26:10: error: 'vector' is not a member of 'std' 26 | std::vector<int> tin(N), used(N), p(N), sz(N); | ^~~~~~ Joi.cpp:26:10: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? Joi.cpp:26:17: error: expected primary-expression before 'int' 26 | std::vector<int> tin(N), used(N), p(N), sz(N); | ^~~ Joi.cpp:28:10: error: 'vector' is not a member of 'std' 28 | std::vector<std::vector<int>> childs(N); | ^~~~~~ Joi.cpp:28:10: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? Joi.cpp:28:22: error: 'vector' is not a member of 'std' 28 | std::vector<std::vector<int>> childs(N); | ^~~~~~ Joi.cpp:28:22: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? Joi.cpp:28:29: error: expected primary-expression before 'int' 28 | std::vector<std::vector<int>> childs(N); | ^~~ Joi.cpp:29:18: error: 'tin' was not declared in this scope 29 | dfs(0, t, 0, tin, used, p, g, childs, sz); | ^~~ Joi.cpp:29:23: error: 'used' was not declared in this scope 29 | dfs(0, t, 0, tin, used, p, g, childs, sz); | ^~~~ Joi.cpp:29:29: error: 'p' was not declared in this scope 29 | dfs(0, t, 0, tin, used, p, g, childs, sz); | ^ Joi.cpp:29:32: error: 'g' was not declared in this scope 29 | dfs(0, t, 0, tin, used, p, g, childs, sz); | ^ Joi.cpp:29:35: error: 'childs' was not declared in this scope 29 | dfs(0, t, 0, tin, used, p, g, childs, sz); | ^~~~~~ Joi.cpp:29:43: error: 'sz' was not declared in this scope 29 | dfs(0, t, 0, tin, used, p, g, childs, sz); | ^~ Ioi.cpp:8:33: error: 'std::vector' has not been declared 8 | void dfs(int v, int& t, int mp, std::vector<int>& tin, std::vector<int>& used, std::vector<int>& p, const std::vector<std::vector<int>>& g, std::vector<std::vector<int>>& childs, std::vector<int>& sz) { | ^~~ Ioi.cpp:8:44: error: expected ',' or '...' before '<' token 8 | void dfs(int v, int& t, int mp, std::vector<int>& tin, std::vector<int>& used, std::vector<int>& p, const std::vector<std::vector<int>>& g, std::vector<std::vector<int>>& childs, std::vector<int>& sz) { | ^ Ioi.cpp: In function 'void dfs(int, int&, int, int)': Ioi.cpp:9:5: error: 'tin' was not declared in this scope 9 | tin[v] = t++; | ^~~ Ioi.cpp:10:5: error: 'p' was not declared in this scope 10 | p[v] = mp; | ^ Ioi.cpp:11:5: error: 'sz' was not declared in this scope 11 | sz[v] = 1; | ^~ Ioi.cpp:15:5: error: 'used' was not declared in this scope 15 | used[v] = 1; | ^~~~ Ioi.cpp:16:20: error: 'g' was not declared in this scope 16 | for (auto& u : g[v]) { | ^ Ioi.cpp:18:13: error: 'childs' was not declared in this scope 18 | childs[v].push_back(u); | ^~~~~~ Ioi.cpp: At global scope: Ioi.cpp:25:64: error: 'vector' in namespace 'std' does not name a template type 25 | void dfs_down(int v, long long val, long long& ans, const std::vector<std::vector<int>>& childs, std::vector<int>& getted, const std::vector<int>& tin) { | ^~~~~~ Ioi.cpp:2:1: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 1 | #include "Ioi.h" +++ |+#include <vector> 2 | Ioi.cpp:25:70: error: expected ',' or '...' before '<' token 25 | void dfs_down(int v, long long val, long long& ans, const std::vector<std::vector<int>>& childs, std::vector<int>& getted, const std::vector<int>& tin) { | ^ Ioi.cpp: In function 'void dfs_down(int, long long int, long long int&, int)': Ioi.cpp:26:5: error: 'getted' was not declared in this scope 26 | getted[tin[v]] += 1; | ^~~~~~ Ioi.cpp:26:12: error: 'tin' was not declared in this scope 26 | getted[tin[v]] += 1; | ^~~ Ioi.cpp:29:20: error: 'childs' was not declared in this scope 29 | for (auto& u : childs[v]) { | ^~~~~~ Ioi.cpp: At global scope: Ioi.cpp:38:26: error: 'std::vector' has not been declared 38 | void dfs2(int v, int& t, std::vector<int>& tin, std::vector<int>& tout, const std::vector<std::vector<int>>& childs) { | ^~~ Ioi.cpp:38:37: error: expected ',' or '...' before '<' token 38 | void dfs2(int v, int& t, std::vector<int>& tin, std::vector<int>& tout, const std::vector<std::vector<int>>& childs) { | ^ Ioi.cpp: In function 'void dfs2(int, int&, int)': Ioi.cpp:39:5: error: 'tin' was not declared in this scope 39 | tin[v] = t++; | ^~~ Ioi.cpp:40:20: error: 'childs' was not declared in this scope 40 | for (auto& u : childs[v]) { | ^~~~~~ Ioi.cpp:41:25: error: 'tout' was not declared in this scope 41 | dfs2(u, t, tin, tout, childs); | ^~~~ Ioi.cpp:43:5: error: 'tout' was not declared in this scope 43 | tout[v] = t - 1; | ^~~~ Ioi.cpp: At global scope: Ioi.cpp:46:95: error: 'vector' in namespace 'std' does not name a template type 46 | void dfs_twice(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { | ^~~~~~ Ioi.cpp:46:90: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 46 | void dfs_twice(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { | ^~~ Ioi.cpp:46:101: error: expected ',' or '...' before '<' token 46 | void dfs_twice(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { | ^ Ioi.cpp: In function 'void dfs_twice(int, long long int, long long int&, int, int, int, int, int)': Ioi.cpp:47:19: error: 'tin' was not declared in this scope 47 | ans += val << tin[v]; | ^~~ Ioi.cpp:48:5: error: 'getted' was not declared in this scope 48 | getted[tin2[v]] += 1; | ^~~~~~ Ioi.cpp:48:12: error: 'tin2' was not declared in this scope 48 | getted[tin2[v]] += 1; | ^~~~ Ioi.cpp:49:20: error: 'childs' was not declared in this scope 49 | for (auto& u : childs[v]) { | ^~~~~~ Ioi.cpp:54:26: error: 'qqr' was not declared in this scope; did you mean 'qql'? 54 | if ((l <= qql && qqr <= r) || (l <= qql + BITS && qqr + BITS <= r)) { | ^~~ | qql Ioi.cpp:58:47: error: 'qqr' was not declared in this scope; did you mean 'qql'? 58 | dfs_twice(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~ | qql Ioi.cpp:58:66: error: 'tout2' was not declared in this scope 58 | dfs_twice(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~~~ Ioi.cpp: At global scope: Ioi.cpp:63:94: error: 'vector' in namespace 'std' does not name a template type 63 | void dfs_once(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { | ^~~~~~ Ioi.cpp:63:89: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 63 | void dfs_once(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { | ^~~ Ioi.cpp:63:100: error: expected ',' or '...' before '<' token 63 | void dfs_once(int v, long long val, long long& ans, int l, int r, int ql, int qr, const std::vector<std::vector<int>>& childs, const std::vector<int>& tin2, const std::vector<int>& tout2, const std::vector<int>& tin, std::vector<int>& getted) { | ^ Ioi.cpp: In function 'void dfs_once(int, long long int, long long int&, int, int, int, int, int)': Ioi.cpp:64:9: error: 'getted' was not declared in this scope 64 | if (getted[tin2[v]] == 0) { | ^~~~~~ Ioi.cpp:64:16: error: 'tin2' was not declared in this scope 64 | if (getted[tin2[v]] == 0) { | ^~~~ Ioi.cpp:65:23: error: 'tin' was not declared in this scope 65 | ans += val << tin[v]; | ^~~ Ioi.cpp:69:20: error: 'childs' was not declared in this scope 69 | for (auto& u : childs[v]) { | ^~~~~~ Ioi.cpp:70:19: error: 'tin2' was not declared in this scope 70 | int qql = tin2[u], qqr = std::min(tout2[u], qr); | ^~~~ Ioi.cpp:74:26: error: 'qqr' was not declared in this scope; did you mean 'qql'? 74 | if ((l <= qql && qqr <= r) || (l <= qql + BITS && qqr + BITS <= r)) { | ^~~ | qql Ioi.cpp:77:30: error: 'qqr' was not declared in this scope; did you mean 'qql'? 77 | if ((qql <= r && r < qqr) || (qql + BITS <= r && r < qqr + BITS)) { | ^~~ | qql Ioi.cpp:81:68: error: 'tout2' was not declared in this scope 81 | dfs_twice(u, new_val, ans, l, r, ql, qr, childs, tin2, tout2, tin, getted); | ^~~~~ Ioi.cpp:81:75: error: 'tin' was not declared in this scope 81 | dfs_twice(u, new_val, ans, l, r, ql, qr, childs, tin2, tout2, tin, getted); | ^~~ Ioi.cpp:81:80: error: 'getted' was not declared in this scope 81 | dfs_twice(u, new_val, ans, l, r, ql, qr, childs, tin2, tout2, tin, getted); | ^~~~~~ Ioi.cpp:88:19: error: 'tin2' was not declared in this scope 88 | int qql = tin2[u], qqr = std::min(tout2[u], qr); | ^~~~ Ioi.cpp:89:46: error: 'qqr' was not declared in this scope; did you mean 'qql'? 89 | dfs_once(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~ | qql Ioi.cpp:89:51: error: 'childs' was not declared in this scope 89 | dfs_once(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~~~~ Ioi.cpp:89:65: error: 'tout2' was not declared in this scope 89 | dfs_once(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~~~ Ioi.cpp:89:72: error: 'tin' was not declared in this scope 89 | dfs_once(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~ Ioi.cpp:89:77: error: 'getted' was not declared in this scope 89 | dfs_once(u, new_val, ans, l, r, qql, qqr, childs, tin2, tout2, tin, getted); | ^~~~~~ Ioi.cpp: At global scope: Ioi.cpp:93:38: error: 'vector' in namespace 'std' does not name a template type 93 | void get_h(int v, int qr, const std::vector<std::vector<int>>& childs, std::vector<int>& h, std::vector<int>& tin2) { | ^~~~~~ Ioi.cpp:93:33: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 93 | void get_h(int v, int qr, const std::vector<std::vector<int>>& childs, std::vector<int>& h, std::vector<int>& tin2) { | ^~~ Ioi.cpp:93:44: error: expected ',' or '...' before '<' token 93 | void get_h(int v, int qr, const std::vector<std::vector<int>>& childs, std::vector<int>& h, std::vector<int>& tin2) { | ^ Ioi.cpp: In function 'void get_h(int, int, int)': Ioi.cpp:94:5: error: 'h' was not declared in this scope 94 | h[v] = 0; | ^ Ioi.cpp:95:20: error: 'childs' was not declared in this scope 95 | for (auto& u : childs[v]) { | ^~~~~~ Ioi.cpp:96:13: error: 'tin2' was not declared in this scope 96 | if (tin2[u] > qr) { | ^~~~ Ioi.cpp:99:33: error: 'tin2' was not declared in this scope 99 | get_h(u, qr, childs, h, tin2); | ^~~~ Ioi.cpp:100:21: error: 'max' is not a member of 'std' 100 | h[v] = std::max(h[v], h[u] + 1); | ^~~ Ioi.cpp: At global scope: Ioi.cpp:104:31: error: 'vector' in namespace 'std' does not name a template type 104 | int get_str(int v, const std::vector<std::vector<int>>& childs, const std::vector<int>& sz, const std::vector<int>& p, std::vector<int>& h) { | ^~~~~~ Ioi.cpp:104:26: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? 104 | int get_str(int v, const std::vector<std::vector<int>>& childs, const std::vector<int>& sz, const std::vector<int>& p, std::vector<int>& h) { | ^~~ Ioi.cpp:104:37: error: expected ',' or '...' before '<' token 104 | int get_str(int v, const std::vector<std::vector<int>>& childs, const std::vector<int>& sz, const std::vector<int>& p, std::vector<int>& h) { | ^ Ioi.cpp: In function 'int get_str(int, int)': Ioi.cpp:106:12: error: 'sz' was not declared in this scope 106 | while (sz[v] < BITS) { | ^~ Ioi.cpp:108:13: error: 'p' was not declared in this scope 108 | v = p[v]; | ^ Ioi.cpp:114:10: error: 'vector' is not a member of 'std' 114 | std::vector<int> tin2(h.size()), tout2(h.size()); | ^~~~~~ Ioi.cpp:114:10: note: 'std::vector' is defined in header '<vector>'; did you forget to '#include <vector>'? Ioi.cpp:114:17: error: expected primary-expression before 'int' 114 | std::vector<int> tin2(h.size()), tout2(h.size()); | ^~~ Ioi.cpp:116:16: error: 'tin2' was not declared in this scope 116 | dfs2(v, t, tin2, tout2, childs); | ^~~~ Ioi.cpp:116:22: error: 'tout2' was not declared in this scope 116 | dfs2(v, t, tin2, tout2, childs); | ^~~~~ Ioi.cpp:116:29: error: 'childs' was not declared in this scope 116 | dfs2(v, t, tin2, tout2, childs); | ^~~~~~ Ioi.cpp:117:42: error: 'h' was not declared in this scope 117 | get_h(v, tin2[v] + BITS - 1, childs, h, tin2); | ^ Ioi.cpp: At global scope: Ioi.cpp:125:60: error: 'std::v' has not been declared 125 | void dfs_ans(int v, int qr, long long val, long long& ans, std::v ector<int>& h, std::vector<int>& tin2, std::vector<int>& getted, const std::vector<std::vector<int>>& childs) { | ^~~ Ioi.cpp:125:72: error: expected ',' or '...' before '<' token 125 | void dfs_ans(int v, int qr, long long val, long long& ans, std::v ector<int>& h, std::vector<int>& tin2, std::vector<int>& getted, const std::vector<std::vector<int>>& childs) { | ^ Ioi.cpp: In function 'void dfs_ans(int, int, long long int, long long int&, int)': Ioi.cpp:126:19: error: 'tin2' was not declared in this scope 126 | ans += val << tin2[v] % BITS; | ^~~~ Ioi.cpp:128:20: error: 'childs' was not declared in this scope 128 | for (auto& u : childs[v]) { | ^~~~~~ Ioi.cpp:132:13: error: 'h' was not declared in this scope 132 | if (h[u] == h[v] - 1 && last == -1) { | ^ Ioi.cpp:136:51: error: 'getted' was not declared in this scope 136 | dfs_ans(u, qr, new_val, ans, h, tin2, getted, childs); | ^~~~~~ Ioi.cpp:142:41: error: 'h' was not declared in this scope 142 | dfs_ans(last, qr, new_val, ans, h, tin2, getted, childs); | ^ Ioi.cpp:142:50: error: 'getted' was not declared in this scope 142 | dfs_ans(last, qr, new_val, ans, h, tin2, getted, childs); | ^~~~~~ Ioi.cpp:142:58: error: 'childs' was not declared in this scope 142 | dfs_ans(last, qr, new_val, ans, h, tin2, getted, childs); | ^~~~~~ Ioi.cpp: In function 'long long int Ioi(int, int, int*, int*, int, int, int)': Ioi.cpp:147:10: error: 'vector' is not a member of 'std' 147 | std::vector<std::vector<int>> g(N); | ^~~~~~ Ioi.cpp:147:10: note: 'std::ve