capital_city.cpp: In function 'int main()':
capital_city.cpp:8:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
8 | scanf("%d %d", &n, &k);
| ~~~~~^~~~~~~~~~~~~~~~~
capital_city.cpp:11:38: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | for (int i = 1; i < n; i++) scanf("%d %d", &x, &y), v[x].emplace_back(y), v[y].emplace_back(x);
| ~~~~~^~~~~~~~~~~~~~~~~
capital_city.cpp:12:39: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
12 | for (int i = 1; i <= n; i++) scanf("%d", &c[i]), st[c[i]] = i;
| ~~~~~^~~~~~~~~~~~~