factories.cpp: In function 'long long int Query(int, int*, int, int*)':
factories.cpp:161:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
161 | for(int i=0;i<List.size();++i){
| ~^~~~~~~~~~~~
factories.cpp:138:7: warning: unused variable 'chk' [-Wunused-variable]
138 | bool chk = 0;
| ^~~
factories.cpp: At global scope:
factories.cpp:209:11: error: redefinition of 'const int LIM'
209 | const int LIM=5e3;
| ^~~
factories.cpp:16:11: note: 'const int LIM' previously defined here
16 | const int LIM=5e3;
| ^~~
factories.cpp:210:10: error: redefinition of 'const long long int INF'
210 | const ll INF=1e18;
| ^~~
factories.cpp:17:10: note: 'const long long int INF' previously defined here
17 | const ll INF=1e18;
| ^~~
factories.cpp:211:14: error: redefinition of 'const string name'
211 | const string name="template";
| ^~~~
factories.cpp:18:14: note: 'const string name' previously declared here
18 | const string name="template";
| ^~~~
factories.cpp:212:5: error: redefinition of 'int n'
212 | int n,m;
| ^
factories.cpp:19:5: note: 'int n' previously declared here
19 | int n,m;
| ^
factories.cpp:212:7: error: redefinition of 'int m'
212 | int n,m;
| ^
factories.cpp:19:7: note: 'int m' previously declared here
19 | int n,m;
| ^
factories.cpp:213:13: error: redefinition of 'std::vector<std::pair<int, long long int> > adj [5005]'
213 | vector<pii> adj[LIM+5],adj_vt[LIM+5];
| ^~~
factories.cpp:20:13: note: 'std::vector<std::pair<int, long long int> > adj [5005]' previously declared here
20 | vector<pii> adj[LIM+5],adj_vt[LIM+5];
| ^~~
factories.cpp:213:24: error: redefinition of 'std::vector<std::pair<int, long long int> > adj_vt [5005]'
213 | vector<pii> adj[LIM+5],adj_vt[LIM+5];
| ^~~~~~
factories.cpp:20:24: note: 'std::vector<std::pair<int, long long int> > adj_vt [5005]' previously declared here
20 | vector<pii> adj[LIM+5],adj_vt[LIM+5];
| ^~~~~~
factories.cpp:214:5: error: redefinition of 'int time_dfs'
214 | int time_dfs=0;
| ^~~~~~~~
factories.cpp:21:5: note: 'int time_dfs' previously defined here
21 | int time_dfs=0;
| ^~~~~~~~
factories.cpp:215:5: error: redefinition of 'std::pair<int, long long int> euler_tour [100005]'
215 | pii euler_tour[100005],sparse_table[20][100005];
| ^~~~~~~~~~
factories.cpp:22:5: note: 'std::pair<int, long long int> euler_tour [100005]' previously defined here
22 | pii euler_tour[100005],sparse_table[20][100005];
| ^~~~~~~~~~
factories.cpp:215:24: error: redefinition of 'std::pair<int, long long int> sparse_table [20][100005]'
215 | pii euler_tour[100005],sparse_table[20][100005];
| ^~~~~~~~~~~~
factories.cpp:22:24: note: 'std::pair<int, long long int> sparse_table [20][100005]' previously defined here
22 | pii euler_tour[100005],sparse_table[20][100005];
| ^~~~~~~~~~~~
factories.cpp:216:5: error: redefinition of 'int tin [5005]'
216 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^~~
factories.cpp:23:5: note: 'int tin [5005]' previously declared here
23 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^~~
factories.cpp:216:16: error: redefinition of 'int tout [5005]'
216 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^~~~
factories.cpp:23:16: note: 'int tout [5005]' previously declared here
23 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^~~~
factories.cpp:216:28: error: redefinition of 'int h [5005]'
216 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^
factories.cpp:23:28: note: 'int h [5005]' previously declared here
23 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^
factories.cpp:216:37: error: redefinition of 'int low [20][5005]'
216 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^~~
factories.cpp:23:37: note: 'int low [20][5005]' previously declared here
23 | int tin[LIM+5],tout[LIM+5],h[LIM+5],low[20][LIM+5];
| ^~~
factories.cpp:217:4: error: redefinition of 'long long int up_weight [20][5005]'
217 | ll up_weight[20][LIM+5],dist_X[LIM+5],dist_Y[LIM+5];
| ^~~~~~~~~
factories.cpp:24:4: note: 'long long int up_weight [20][5005]' previously declared here
24 | ll up_weight[20][LIM+5],dist_X[LIM+5],dist_Y[LIM+5];
| ^~~~~~~~~
factories.cpp:217:25: error: redefinition of 'long long int dist_X [5005]'
217 | ll up_weight[20][LIM+5],dist_X[LIM+5],dist_Y[LIM+5];
| ^~~~~~
factories.cpp:24:25: note: 'long long int dist_X [5005]' previously declared here
24 | ll up_weight[20][LIM+5],dist_X[LIM+5],dist_Y[LIM+5];
| ^~~~~~
factories.cpp:217:39: error: redefinition of 'long long int dist_Y [5005]'
217 | ll up_weight[20][LIM+5],dist_X[LIM+5],dist_Y[LIM+5];
| ^~~~~~
factories.cpp:24:39: note: 'long long int dist_Y [5005]' previously declared here
24 | ll up_weight[20][LIM+5],dist_X[LIM+5],dist_Y[LIM+5];
| ^~~~~~
factories.cpp:218:13: error: redefinition of 'std::vector<int> List'
218 | vector<int> List;
| ^~~~
factories.cpp:25:13: note: 'std::vector<int> List' previously declared here
25 | vector<int> List;
| ^~~~
factories.cpp:219:5: error: redefinition of 'int color [5005]'
219 | int color[LIM+5];
| ^~~~~
factories.cpp:26:5: note: 'int color [5005]' previously declared here
26 | int color[LIM+5];
| ^~~~~
factories.cpp:220:13: error: redefinition of 'std::vector<int> st'
220 | vector<int> st;
| ^~
factories.cpp:27:13: note: 'std::vector<int> st' previously declared here
27 | vector<int> st;
| ^~
factories.cpp:221:6: error: redefinition of 'void dfs(int, int, int)'
221 | void dfs(int u,int parent,int depth){
| ^~~
factories.cpp:28:6: note: 'void dfs(int, int, int)' previously defined here
28 | void dfs(int u,int parent,int depth){
| ^~~
factories.cpp:242:5: error: redefinition of 'int lca(int, int)'
242 | int lca(int u,int v){
| ^~~
factories.cpp:49:5: note: 'int lca(int, int)' previously defined here
49 | int lca(int u,int v){
| ^~~
factories.cpp:251:4: error: redefinition of 'long long int lift_weight(int, int)'
251 | ll lift_weight(int u,int k){
| ^~~~~~~~~~~
factories.cpp:58:4: note: 'long long int lift_weight(int, int)' previously defined here
58 | ll lift_weight(int u,int k){
| ^~~~~~~~~~~
factories.cpp:265:6: error: redefinition of 'bool cmp(int, int)'
265 | bool cmp(int a,int b){
| ^~~
factories.cpp:72:6: note: 'bool cmp(int, int)' previously defined here
72 | bool cmp(int a,int b){
| ^~~
factories.cpp:269:6: error: redefinition of 'bool isSubtree(int, int)'
269 | bool isSubtree(int u,int v)
| ^~~~~~~~~
factories.cpp:76:6: note: 'bool isSubtree(int, int)' previously defined here
76 | bool isSubtree(int u,int v)
| ^~~~~~~~~
factories.cpp:273:6: error: redefinition of 'void dfs_to_find_sol(int, int)'
273 | void dfs_to_find_sol(int u,int parent){
| ^~~~~~~~~~~~~~~
factories.cpp:80:6: note: 'void dfs_to_find_sol(int, int)' previously defined here
80 | void dfs_to_find_sol(int u,int parent){
| ^~~~~~~~~~~~~~~
factories.cpp:281:6: error: redefinition of 'void Init(int, int*, int*, int*)'
281 | void Init(int N, int A[], int B[], int D[]){
| ^~~~
factories.cpp:88:6: note: 'void Init(int, int*, int*, int*)' previously defined here
88 | void Init(int N, int A[], int B[], int D[]){
| ^~~~
factories.cpp:317:11: error: redefinition of 'long long int Query(int, int*, int, int*)'
317 | long long Query(int S, int X[], int T, int Y[]){
| ^~~~~
factories.cpp:124:11: note: 'long long int Query(int, int*, int, int*)' previously defined here
124 | long long Query(int S, int X[], int T, int Y[]){
| ^~~~~
factories.cpp: In function 'long long int Query(int, int*, int, int*)':
factories.cpp:354:15: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
354 | for(int i=0;i<List.size();++i){
| ~^~~~~~~~~~~~
factories.cpp:331:7: warning: unused variable 'chk' [-Wunused-variable]
331 | bool chk = 0;
| ^~~