werewolf.cpp:5:22: error: expected initializer before numeric constant
5 | int uor[MAXN],seg[50]4*MAXN],dsu[2*MAXN],t,pr[MAXN],l[2*MAXN],r[2*MAXN],sz[2*MAXN],n,pk[2*MAXN],br;
| ^
werewolf.cpp: In function 'void upd(int, int, int, int, int, int)':
werewolf.cpp:9:15: error: 'seg' was not declared in this scope
9 | if(l==r) {seg[k][ind]+=val; return;}
| ^~~
werewolf.cpp:13:5: error: 'seg' was not declared in this scope
13 | seg[k][ind]+=val;
| ^~~
werewolf.cpp: In function 'int query(int, int, int, int, int, int)':
werewolf.cpp:17:31: error: 'seg' was not declared in this scope
17 | if(l>=lt && r<=rt) return seg[k][ind];
| ^~~
werewolf.cpp: In function 'int root(int)':
werewolf.cpp:24:11: error: 'dsu' was not declared in this scope
24 | while(dsu[u]!=u)
| ^~~
werewolf.cpp: In function 'void connect(int, int, int)':
werewolf.cpp:35:5: error: 'dsu' was not declared in this scope
35 | dsu[a]=dsu[b]=dsu[t]=t;
| ^~~
werewolf.cpp:35:23: error: 't' was not declared in this scope
35 | dsu[a]=dsu[b]=dsu[t]=t;
| ^
werewolf.cpp: In function 'void dfsg(int)':
werewolf.cpp:44:5: error: 'l' was not declared in this scope
44 | l[s]=br;
| ^
werewolf.cpp:44:10: error: 'br' was not declared in this scope
44 | l[s]=br;
| ^~
werewolf.cpp:45:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
45 | for(int i=0;i<gg[s].size();i++) dfsg(gg[s][i]);
| ~^~~~~~~~~~~~~
werewolf.cpp:46:5: error: 'r' was not declared in this scope
46 | r[s]=br;
| ^
werewolf.cpp: In function 'void dfssz(int)':
werewolf.cpp:51:5: error: 'sz' was not declared in this scope; did you mean 's'?
51 | sz[s]=0;
| ^~
| s
werewolf.cpp:52:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
52 | for(int i=0;i<gd[s].size();i++) dfssz(gd[s][i]);
| ~^~~~~~~~~~~~~
werewolf.cpp:53:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
53 | for(int i=0;i<gd[s].size();i++) sz[s]+=sz[gd[s][i]];
| ~^~~~~~~~~~~~~
werewolf.cpp: In function 'bool cmp(int, int)':
werewolf.cpp:56:31: error: 'sz' was not declared in this scope; did you mean 's'?
56 | bool cmp(int a,int b) {return sz[a]>sz[b];}
| ^~
| s
werewolf.cpp: In function 'void dfsd(int, int)':
werewolf.cpp:61:46: error: 'pk' was not declared in this scope; did you mean 'vk'?
61 | if(gd[s].size()!=0) {dfsd(gd[s][0],ind); pk[s]=pk[gd[s][0]];}
| ^~
| vk
werewolf.cpp:62:11: error: 'pk' was not declared in this scope; did you mean 'vk'?
62 | else {pk[s]=s; vk[s].push_back(s); upd(ind,0,n-1,uor[s],1,1);}
| ^~
| vk
werewolf.cpp:62:50: error: 'n' was not declared in this scope
62 | else {pk[s]=s; vk[s].push_back(s); upd(ind,0,n-1,uor[s],1,1);}
| ^
werewolf.cpp:63:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
63 | for(int i=1;i<gd[s].size();i++)
| ~^~~~~~~~~~~~~
werewolf.cpp:66:26: error: 'pk' was not declared in this scope; did you mean 'vk'?
66 | for(int j=0;j<vk[pk[gd[s][i]]].size();j++) {vk[pk[s]].push_back(vk[pk[gd[s][i]]][j]); upd(ind,0,n-1,uor[vk[pk[gd[s][i]]][j]],1,1); upd(ind+1,0,n-1,uor[vk[pk[gd[s][i]]][j]],-1,1);}
| ^~
| vk
werewolf.cpp:66:105: error: 'n' was not declared in this scope
66 | for(int j=0;j<vk[pk[gd[s][i]]].size();j++) {vk[pk[s]].push_back(vk[pk[gd[s][i]]][j]); upd(ind,0,n-1,uor[vk[pk[gd[s][i]]][j]],1,1); upd(ind+1,0,n-1,uor[vk[pk[gd[s][i]]][j]],-1,1);}
| ^
werewolf.cpp:68:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
68 | for(int i=0;i<q[s].size();i++) A[q[s][i]]=(query(ind,0,n-1,l[pr[q[s][i]]],r[pr[q[s][i]]],1)>0)?1:0;
| ~^~~~~~~~~~~~
werewolf.cpp:68:60: error: 'n' was not declared in this scope
68 | for(int i=0;i<q[s].size();i++) A[q[s][i]]=(query(ind,0,n-1,l[pr[q[s][i]]],r[pr[q[s][i]]],1)>0)?1:0;
| ^
werewolf.cpp:68:64: error: 'l' was not declared in this scope
68 | for(int i=0;i<q[s].size();i++) A[q[s][i]]=(query(ind,0,n-1,l[pr[q[s][i]]],r[pr[q[s][i]]],1)>0)?1:0;
| ^
werewolf.cpp:68:66: error: 'pr' was not declared in this scope
68 | for(int i=0;i<q[s].size();i++) A[q[s][i]]=(query(ind,0,n-1,l[pr[q[s][i]]],r[pr[q[s][i]]],1)>0)?1:0;
| ^~
werewolf.cpp:68:79: error: 'r' was not declared in this scope
68 | for(int i=0;i<q[s].size();i++) A[q[s][i]]=(query(ind,0,n-1,l[pr[q[s][i]]],r[pr[q[s][i]]],1)>0)?1:0;
| ^
werewolf.cpp: In function 'std::vector<int> check_validity(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
werewolf.cpp:73:23: error: 'n' was not declared in this scope
73 | int Q = S.size(); n=N;
| ^
werewolf.cpp:75:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
75 | for(int i=0;i<X.size();i++) g[X[i]].push_back(Y[i]);
| ~^~~~~~~~~
werewolf.cpp:76:18: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
76 | for(int i=0;i<X.size();i++) g[Y[i]].push_back(X[i]);
| ~^~~~~~~~~
werewolf.cpp:79:26: error: 'dsu' was not declared in this scope
79 | for(int i=0;i<N;i++) dsu[i]=i;
| ^~~
werewolf.cpp:80:5: error: 't' was not declared in this scope
80 | t=N;
| ^
werewolf.cpp:83:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
83 | for(int j=0;j<g[i].size();j++) if(i>g[i][j]) connect(i,g[i][j],1);
| ~^~~~~~~~~~~~
werewolf.cpp:84:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
84 | for(int j=0;j<e[i].size();j++) q[root(E[e[i][j]])].push_back(e[i][j]);
| ~^~~~~~~~~~~~
werewolf.cpp:86:26: error: 'dsu' was not declared in this scope
86 | for(int i=0;i<N;i++) dsu[i]=i;
| ^~~
werewolf.cpp:90:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
90 | for(int j=0;j<g[i].size();j++) if(i<g[i][j]) connect(i,g[i][j],2);
| ~^~~~~~~~~~~~
werewolf.cpp:91:22: warning: comparison of integer expressions of different signedness: 'int' and 'std::vector<int>::size_type' {aka 'long unsigned int'} [-Wsign-compare]
91 | for(int j=0;j<s[i].size();j++) pr[s[i][j]]=root(S[s[i][j]]);
| ~^~~~~~~~~~~~
werewolf.cpp:91:40: error: 'pr' was not declared in this scope
91 | for(int j=0;j<s[i].size();j++) pr[s[i][j]]=root(S[s[i][j]]);
| ^~