0_0_36873154_6478.cpp:16:5: error: redefinition of 'int n' int n, m, cnt, f[MaxN], d[MaxN], size[MaxN], son[MaxN], rk[MaxN], top[MaxN], id[MaxN]; ^ 0_0_36873154_6478.cpp:9:13: note: 'int n' previously declared here int ts = 1, n, q; ^