foo.cc: In function 'int main()':
foo.cc:37:6: warning: unused variable 'pre' [-Wunused-variable]
37 | int pre=0;
| ^~~
foo.cc:26:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
26 | scanf("%d",&j);//输入的是父节点
| ~~~~~^~~~~~~~~
foo.cc:31:8: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
31 | scanf("%d",&color[i]);
| ~~~~~^~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务