foo.cc: In function 'int find(int)':
foo.cc:15:18: error: 'fa' was not declared in this scope; did you mean 'f'?
15 | else return fa[x]=find(f[x]);
| ^~
| f
foo.cc: In function 'int main()':
foo.cc:26:16: error: 'xx' was not declared in this scope
26 | int aa=find(xx);
| ^~
foo.cc:27:16: error: 'yy' was not declared in this scope
27 | int bb=find(yy);
| ^~
foo.cc:24:8: warning: unused variable 'a' [-Wunused-variable]
24 | int a=edge[i].x;
| ^
foo.cc:25:8: warning: unused variable 'b' [-Wunused-variable]
25 | int b=edge[i].y;
| ^
foo.cc:19:7: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
19 | scanf("%d%d%d",&n,&m,&k);
| ~~~~~^~~~~~~~~~~~~~~~~~~
foo.cc:20:29: warning: ignoring return value of 'int scanf(const char*, ...)', declared with attribute warn_unused_result [-Wunused-result]
20 | for(int i=1;i<=m;i++) scanf("%d%d%d",&edge[i].x,&edge[i].y,&edge[i].w);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
[Hydro](https://hydro.ac)提供评测服务