foo.cc: In function 'int main()':
foo.cc:44:17: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
i==(1<<j+1)&&(++j),hb[i]=j;
~^~
foo.cc:58:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (t<0) ans=(-t>=a[y].size()?0:a[y][-t]);
~~^~~~~~~~~~~~~
foo.cc:59:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else ans=(t>=b[y].size()?0:b[y][t]);
~^~~~~~~~~~~~~
foo.cc: At global scope:
foo.cc:70:11: error: redefinition of 'const int N'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:11: note: 'const int N' previously defined here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:25: error: redefinition of 'int n'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:25: note: 'int n' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:27: error: redefinition of 'int m'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:27: note: 'int m' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:29: error: redefinition of 'int lgn'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:5:29: note: 'int lgn' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:70:33: error: redefinition of 'int cnt'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:5:33: note: 'int cnt' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:70:37: error: redefinition of 'int x'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:37: note: 'int x' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:39: error: redefinition of 'int y'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:39: note: 'int y' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:41: error: redefinition of 'int k'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:41: note: 'int k' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:43: error: redefinition of 'int len'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:5:43: note: 'int len' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:70:47: error: redefinition of 'int t'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:5:47: note: 'int t' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^
foo.cc:70:49: error: redefinition of 'int ans'
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:5:49: note: 'int ans' previously declared here
const int N=300010; int n,m,lgn,cnt,x,y,k,len,t,ans;
^~~
foo.cc:71:11: error: redefinition of 'int last [300010]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:5: note: 'int last [300010]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^~~~
foo.cc:71:18: error: redefinition of 'int dep [300010]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:13: note: 'int dep [300010]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^~~
foo.cc:71:26: error: redefinition of 'int depm [300010]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:20: note: 'int depm [300010]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^~~~
foo.cc:71:33: error: redefinition of 'int top [300010]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:28: note: 'int top [300010]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^~~
foo.cc:71:40: error: redefinition of 'int son [300010]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:35: note: 'int son [300010]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^~~
foo.cc:71:46: error: redefinition of 'int hb [300010]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:42: note: 'int hb [300010]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^~
foo.cc:71:55: error: redefinition of 'int f [300010][20]'
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:6:48: note: 'int f [300010][20]' previously declared here
int last[N],dep[N],depm[N],top[N],son[N],hb[N],f[N][20];
^
foo.cc:72:8: error: redefinition of 'struct node'
struct node { int y,pre; }E[N<<1];
^~~~
foo.cc:7:8: note: previous definition of 'struct node'
struct node { int y,pre; }E[N<<1];
^~~~
foo.cc:72:33: error: conflicting declaration 'int E [600020]'
struct node { int y,pre; }E[N<<1];
^
foo.cc:7:27: note: previous declaration as 'node E [600020]'
struct node { int y,pre; }E[N<<1];
^
foo.cc:73:20: error: redefinition of 'std::vector<int> a [300010]'
std::vector<int>a[N],b[N];
^
foo.cc:8:17: note: 'std::vector<int> a [300010]' previously declared here
std::vector<int>a[N],b[N];
^
foo.cc:73:25: error: redefinition of 'std::vector<int> b [300010]'
std::vector<int>a[N],b[N];
^
foo.cc:8:22: note: 'std::vector<int> b [300010]' previously declared here
std::vector<int>a[N],b[N];
^
foo.cc: In function 'void dfs(int, int)':
foo.cc:74:6: error: redefinition of 'void dfs(int, int)'
void dfs(int x,int fa) {
^~~
foo.cc:9:6: note: 'void dfs(int, int)' previously defined here
void dfs(int x,int fa) {
^~~
foo.cc: In function 'void dfs2(int, int)':
foo.cc:85:6: error: redefinition of 'void dfs2(int, int)'
void dfs2(int x,int tx) {
^~~~
foo.cc:20:6: note: 'void dfs2(int, int)' previously defined here
void dfs2(int x,int tx) {
^~~~
foo.cc: At global scope:
foo.cc:93:13: error: redefinition of 'char c [2097152]'
char c[1<<21],*l=c,*r=c;
^
foo.cc:28:6: note: 'char c [2097152]' previously declared here
char c[1<<21],*l=c,*r=c;
^
foo.cc:93:16: error: redefinition of 'char* l'
char c[1<<21],*l=c,*r=c;
^
foo.cc:28:16: note: 'char* l' previously defined here
char c[1<<21],*l=c,*r=c;
^
foo.cc:93:21: error: redefinition of 'char* r'
char c[1<<21],*l=c,*r=c;
^
foo.cc:28:21: note: 'char* r' previously defined here
char c[1<<21],*l=c,*r=c;
^
foo.cc: In function 'int read()':
foo.cc:94:5: error: redefinition of 'int read()'
int read() {
^~~~
foo.cc:29:5: note: 'int read()' previously defined here
int read() {
^~~~
foo.cc: In function 'int main()':
foo.cc:100:5: error: redefinition of 'int main()'
int main() {
^~~~
foo.cc:35:5: note: 'int main()' previously defined here
int main() {
^~~~
foo.cc:109:17: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
i==(1<<j+1)&&(++j),hb[i]=j;
~^~
foo.cc:123:29: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (t<0) ans=(-t>=a[y].size()?0:a[y][-t]);
~~^~~~~~~~~~~~~
foo.cc:124:24: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
else ans=(t>=b[y].size()?0:b[y][t]);
~^~~~~~~~~~~~~