treearray.cpp: In function 'void dfs(int, int)':
treearray.cpp:21:24: warning: suggest parentheses around '+' inside '<<' [-Wparentheses]
for(int j = 0; 1 << j+1 <= d[v]; j++)
^
treearray.cpp: In function 'int lca(int, int)':
treearray.cpp:30:12: warning: suggest parentheses around '-' inside '>>' [-Wparentheses]
if(d[u] - d[v] >> j & 1) u = anc[u][j];
^
treearray.cpp:34:8: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if(j < anc[u].size() && anc[u][j] != anc[v][j])
^
treearray.cpp: In function 'int main()':
treearray.cpp:40:31: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &n, &m, &q);
^
treearray.cpp:42:25: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &u, &v);
^
treearray.cpp:48:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", a+i);
^
treearray.cpp:53:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &tp);
^
treearray.cpp:55:26: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &i, &v);
^
treearray.cpp:64:33: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", &l, &r, &v);
^