treearray.cpp: In function 'bool isanc(int, int)':
treearray.cpp:59:9: error: 'ent' was not declared in this scope
return ent[x] <= ent[y] && exi[y] <= exi[x];
^~~
treearray.cpp:59:9: note: suggested alternative: 'int'
return ent[x] <= ent[y] && exi[y] <= exi[x];
^~~
int
treearray.cpp:59:29: error: 'exi' was not declared in this scope
return ent[x] <= ent[y] && exi[y] <= exi[x];
^~~
treearray.cpp:59:29: note: suggested alternative: 'exit'
return ent[x] <= ent[y] && exi[y] <= exi[x];
^~~
exit
treearray.cpp: In function 'int main()':
treearray.cpp:91:7: 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:94:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &x, &y);
~~~~~^~~~~~~~~~~~~~~~~
treearray.cpp:102:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &A[i]);
~~~~~^~~~~~~~~~~~~
treearray.cpp:114:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d", &qt);
~~~~~^~~~~~~~~~~
treearray.cpp:117:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d", &pos, &v);
~~~~~^~~~~~~~~~~~~~~~~~~
treearray.cpp:138:9: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
scanf("%d %d %d", <, &rt, &v);
~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~