tree.cpp: In function 'void un_check(int)':
tree.cpp:28:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < edge[w].size(); i++) {
^
tree.cpp: In function 'void labeling(int)':
tree.cpp:39:15: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
for (i = 0; i < edge[w].size(); i++) {
^
tree.cpp: In function 'int main()':
tree.cpp:106:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nowi == edge[noww].size())
^
tree.cpp:118:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
if (nowi == edge[noww].size()) {
^
tree.cpp:53:8: warning: unused variable 'j' [-Wunused-variable]
int i, j;
^
tree.cpp:55:5: warning: unused variable 'P' [-Wunused-variable]
int P;
^
tree.cpp:59:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &n, &q);
^
tree.cpp:69:24: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &parent[i]);
^
tree.cpp:77:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &flag);
^
tree.cpp:79:22: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d%d", &a, &b);
^
tree.cpp:88:19: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &cut1);
^