tree.cpp: In function 'void spread(int, int)':
tree.cpp:9:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for(int i = 0;i < v[x].size();i++)
~~^~~~~~~~~~~~~
tree.cpp: In function 'int main()':
tree.cpp:19:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &n, &q);
~~~~~^~~~~~~~~~~~~~~~~
tree.cpp:24:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &pa[i]);
~~~~~^~~~~~~~~~~~~~
tree.cpp:30:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &x);
~~~~~^~~~~~~~~~
tree.cpp:33:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &b);
~~~~~^~~~~~~~~~
tree.cpp:38:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &c, &d);
~~~~~^~~~~~~~~~~~~~~~~