0_0_19231276_21346.cpp:31:10: error: 'a' was not declared in this scope
int i = (a); i <= (b); i ++)
^
0_0_19231276_21346.cpp:31:14: error: 'i' does not name a type
int i = (a); i <= (b); i ++)
^
0_0_19231276_21346.cpp:31:24: error: 'i' does not name a type
int i = (a); i <= (b); i ++)
^
0_0_19231276_21346.cpp:33:14: error: 'i' does not name a type
int i = (a); i >= (b); i --) template<class T> T MAX(T a, T b) { return a > b ? a : b; }template<class T> T MIN(T a, T b) { return a < b ? a : b; }template<class T> T GCD(T a, T b) { return b ? GCD(b, a%b) : a; }template<class T> T LCM(T a, T b) { return a / GCD(a,b) * b; }
^
0_0_19231276_21346.cpp:33:24: error: 'i' does not name a type
int i = (a); i >= (b); i --) template<class T> T MAX(T a, T b) { return a > b ? a : b; }template<class T> T MIN(T a, T b) { return a < b ? a : b; }template<class T> T GCD(T a, T b) { return b ? GCD(b, a%b) : a; }template<class T> T LCM(T a, T b) { return a / GCD(a,b) * b; }
^
0_0_19231276_21346.cpp:153:320: error: expected '}' at end of input
int xy = lca.lca_query(x, y); ans += (u == 1 ? 1 : -1) * (lca.dis[v] - lca.dis[xv] - lca.dis[yv] + lca.dis[xy]); } else ans = 0; if(u == 1) st.update(1, 1, lca.node_cnt, lca.P[v], 1); } printf("%d\n", ans); } } return 0;}
^
0_0_19231276_21346.cpp: In member function 'void LCA::init(int)':
0_0_19231276_21346.cpp:66:96: error: expected primary-expression before '}' token
int n) { mem0(dep); mem0(K); node_cnt = 0; rep (i, 0, n) G[i].clear(); }
^
0_0_19231276_21346.cpp:66:96: error: expected ';' before '}' token
0_0_19231276_21346.cpp:66:96: error: expected primary-expression before '}' token
0_0_19231276_21346.cpp:66:96: error: expected ')' before '}' token
0_0_19231276_21346.cpp:66:96: error: expected primary-expression before '}' token
0_0_19231276_21346.cpp: In member function 'void LCA::dfs(int, int, int, int)':
0_0_19231276_21346.cpp:82:49: error: expected primary-expression before '{' token
int sz = G[u].size(); rep (i, 0, sz - 1) {
^
0_0_19231276_21346.cpp:84:184: error: expected primary-expression before '}' token
int v = G[u][i].v; if(v == fa) continue; dfs(v, u, height + 1, dist + G[u][i].w); idx[++node_cnt] = u; dep[node_cnt] = height; } }
^
0_0_19231276_21346.cpp:84:184: error: expected ';' before '}' token
0_0_19231276_21346.cpp:84:184: error: expected primary-expression before '}' token
0_0_19231276_21346.cpp:84:184: error: expected ')' before '}' token
0_0_19231276_21346.cpp:84:184: error: expected primary-expression before '}' token
0_0_19231276_21346.cpp: At global scope:
0_0_19231276_21346.cpp:84:184: error: expected unqualified-id at end of input
|