factories.cpp: In function 'long long int Query(long long int, int*, int, int*)':
factories.cpp:138:14: warning: comparison of integer expressions of different signedness: 'long long int' and 'std::vector<long long int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
138 | for(ll i=0;i<List.size();++i){
| ~^~~~~~~~~~~~
factories.cpp: In function 'void dfs(long long int, long long int, long long int)':
factories.cpp:36:7: warning: array subscript 0 is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
36 | low[0][u] = parent;
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp: In function 'long long int lift_weight(long long int, long long int)':
factories.cpp:65:11: warning: array subscript u is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
65 | u=low[u][tmp];
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp: In function 'void Init(int, int*, int*, int*)':
factories.cpp:112:32: warning: array subscript <unknown> is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
112 | low[i][j] = low[i-1][low[i-1][j]];
| ~~~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp:112:23: warning: array subscript <unknown> is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
112 | low[i][j] = low[i-1][low[i-1][j]];
| ~~~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp:112:9: warning: array subscript i is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
112 | low[i][j] = low[i-1][low[i-1][j]];
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp: In function 'long long int Query(long long int, int*, int, int*)':
factories.cpp:65:11: warning: array subscript u is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
65 | u=low[u][tmp];
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp:65:11: warning: array subscript u is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
65 | u=low[u][tmp];
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp:65:11: warning: array subscript u is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
65 | u=low[u][tmp];
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
factories.cpp:65:11: warning: array subscript u is outside array bounds of 'long long int [0][5005]' [-Warray-bounds]
65 | u=low[u][tmp];
| ~~~~~^
factories.cpp:24:57: note: while referencing 'low'
24 | ll tin[LIM+5],tout[LIM+5],h[LIM+5],up_weight[20][LIM+5],low[0][LIM+5];
| ^~~
/usr/bin/ld: /tmp/cccgLxb4.o: in function `main':
grader.cpp:(.text.startup+0x412): undefined reference to `Query(int, int*, int, int*)'
collect2: error: ld returned 1 exit status