factories.cpp:13:8: error: 'pii' was not declared in this scope; did you mean 'pai'?
13 | vector<pii> g[MAXN];
| ^~~
| pai
factories.cpp:13:11: error: template argument 1 is invalid
13 | vector<pii> g[MAXN];
| ^
factories.cpp:13:11: error: template argument 2 is invalid
factories.cpp: In function 'int getsz(int, int)':
factories.cpp:17:9: error: 'pii' was not declared in this scope; did you mean 'pai'?
17 | for(pii &i : g[u])
| ^~~
| pai
factories.cpp:17:16: error: found ':' in nested-name-specifier, expected '::'
17 | for(pii &i : g[u])
| ^
| ::
factories.cpp:17:14: error: 'i' has not been declared
17 | for(pii &i : g[u])
| ^
factories.cpp:20:5: error: expected primary-expression before 'return'
20 | return sz[u];
| ^~~~~~
factories.cpp:19:36: error: expected ';' before 'return'
19 | sz[u] += getsz(i.f, u);
| ^
| ;
20 | return sz[u];
| ~~~~~~
factories.cpp:20:5: error: expected primary-expression before 'return'
20 | return sz[u];
| ^~~~~~
factories.cpp:19:36: error: expected ')' before 'return'
19 | sz[u] += getsz(i.f, u);
| ^
| )
20 | return sz[u];
| ~~~~~~
factories.cpp:17:8: note: to match this '('
17 | for(pii &i : g[u])
| ^
factories.cpp: In function 'int findc(int, int, int)':
factories.cpp:24:9: error: 'pii' was not declared in this scope; did you mean 'pai'?
24 | for(pii &i : g[u])
| ^~~
| pai
factories.cpp:24:16: error: found ':' in nested-name-specifier, expected '::'
24 | for(pii &i : g[u])
| ^
| ::
factories.cpp:24:14: error: 'i' has not been declared
24 | for(pii &i : g[u])
| ^
factories.cpp:27:5: error: expected primary-expression before 'return'
27 | return u;
| ^~~~~~
factories.cpp:26:37: error: expected ';' before 'return'
26 | return findc(i.f, u, n);
| ^
| ;
27 | return u;
| ~~~~~~
factories.cpp:27:5: error: expected primary-expression before 'return'
27 | return u;
| ^~~~~~
factories.cpp:26:37: error: expected ')' before 'return'
26 | return findc(i.f, u, n);
| ^
| )
27 | return u;
| ~~~~~~
factories.cpp:24:8: note: to match this '('
24 | for(pii &i : g[u])
| ^
factories.cpp: In function 'void build(int, int)':
factories.cpp:35:9: error: 'pii' was not declared in this scope; did you mean 'pai'?
35 | for(pii &i : g[c])
| ^~~
| pai
factories.cpp:35:16: error: found ':' in nested-name-specifier, expected '::'
35 | for(pii &i : g[c])
| ^
| ::
factories.cpp:35:14: error: 'i' has not been declared
35 | for(pii &i : g[c])
| ^
factories.cpp:38:1: error: expected primary-expression before '}' token
38 | }
| ^
factories.cpp:37:27: error: expected ';' before '}' token
37 | build(i.f, c);
| ^
| ;
38 | }
| ~
factories.cpp:38:1: error: expected primary-expression before '}' token
38 | }
| ^
factories.cpp:37:27: error: expected ')' before '}' token
37 | build(i.f, c);
| ^
| )
38 | }
| ~
factories.cpp:35:8: note: to match this '('
35 | for(pii &i : g[c])
| ^
factories.cpp:38:1: error: expected primary-expression before '}' token
38 | }
| ^
factories.cpp: In function 'void dfs(int)':
factories.cpp:42:9: error: 'pii' was not declared in this scope; did you mean 'pai'?
42 | for(pii &i : g[u])
| ^~~
| pai
factories.cpp:42:16: error: found ':' in nested-name-specifier, expected '::'
42 | for(pii &i : g[u])
| ^
| ::
factories.cpp:42:14: error: 'i' has not been declared
42 | for(pii &i : g[u])
| ^
factories.cpp:49:1: error: expected primary-expression before '}' token
49 | }
| ^
factories.cpp:48:10: error: expected ';' before '}' token
48 | }
| ^
| ;
49 | }
| ~
factories.cpp:49:1: error: expected primary-expression before '}' token
49 | }
| ^
factories.cpp:48:10: error: expected ')' before '}' token
48 | }
| ^
| )
49 | }
| ~
factories.cpp:42:8: note: to match this '('
42 | for(pii &i : g[u])
| ^
factories.cpp:49:1: error: expected primary-expression before '}' token
49 | }
| ^
factories.cpp: In function 'int query(int)':
factories.cpp:4:14: warning: overflow in conversion from 'long int' to 'int' changes value from '4557430888798830399' to '1061109567' [-Woverflow]
4 | #define LINF 0x3f3f3f3f3f3f3f3f
| ^~~~~~~~~~~~~~~~~~
factories.cpp:83:24: note: in expansion of macro 'LINF'
83 | int aux = u, ans = LINF;
| ^~~~
factories.cpp: In function 'void reset(int)':
factories.cpp:4:14: warning: overflow in conversion from 'long int' to 'int' changes value from '4557430888798830399' to '1061109567' [-Woverflow]
4 | #define LINF 0x3f3f3f3f3f3f3f3f
| ^~~~~~~~~~~~~~~~~~
factories.cpp:93:19: note: in expansion of macro 'LINF'
93 | best[u] = LINF;
| ^~~~
factories.cpp: In function 'void Init(int, int*, int*, int*)':
factories.cpp:4:14: warning: overflow in conversion from 'long int' to 'int' changes value from '4557430888798830399' to '1061109567' [-Woverflow]
4 | #define LINF 0x3f3f3f3f3f3f3f3f
| ^~~~~~~~~~~~~~~~~~
factories.cpp:100:19: note: in expansion of macro 'LINF'
100 | best[i] = LINF;
| ^~~~
factories.cpp:3:12: error: request for member 'push_back' in 'g[(*(a + ((sizetype)(((long unsigned int)i) * 4))))]', which is of non-class type 'int'
3 | #define pb push_back
| ^~~~~~~~~
factories.cpp:103:17: note: in expansion of macro 'pb'
103 | g[a[i]].pb({b[i], c[i]});
| ^~
factories.cpp:3:12: error: request for member 'push_back' in 'g[(*(b + ((sizetype)(((long unsigned int)i) * 4))))]', which is of non-class type 'int'
3 | #define pb push_back
| ^~~~~~~~~
factories.cpp:104:17: note: in expansion of macro 'pb'
104 | g[b[i]].pb({a[i], c[i]});
| ^~
factories.cpp: In function 'long long int Query(int, int*, int, int*)':
factories.cpp:4:14: warning: overflow in conversion from 'long int' to 'int' changes value from '4557430888798830399' to '1061109567' [-Woverflow]
4 | #define LINF 0x3f3f3f3f3f3f3f3f
| ^~~~~~~~~~~~~~~~~~
factories.cpp:116:15: note: in expansion of macro 'LINF'
116 | int ans = LINF;
| ^~~~