balancedtree.cpp: In function 'int main()':
balancedtree.cpp:54:11: warning: unused variable 'M' [-Wunused-variable]
   54 |     int T,M,i,x,y;
      |           ^
balancedtree.cpp:55:10: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   55 |     scanf("%d",&T);
      |     ~~~~~^~~~~~~~~
balancedtree.cpp:59:14: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   59 |         scanf("%d",&N);
      |         ~~~~~^~~~~~~~~
balancedtree.cpp:62:18: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   62 |             scanf("%d %d",&x,&y);
      |             ~~~~~^~~~~~~~~~~~~~~
balancedtree.cpp:66:32: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
   66 |         for(i=1;i<=N;i++) scanf("%d",&what[i]);
      |                           ~~~~~^~~~~~~~~~~~~~~
balancedtree.cpp: In function 'void F(int)':
balancedtree.cpp:41:18: warning: 'i' may be used uninitialized in this function [-Wmaybe-uninitialized]
   41 |         if(what[i]==-1)
      |            ~~~~~~^