cities.cpp: In function 'int main()':
cities.cpp:11:10: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
11 | scanf("%d %d %d", &n, &k, &m);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~
cities.cpp:14:27: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
14 | for (auto &e: c) scanf("%d", &e);
| ~~~~~^~~~~~~~~~
cities.cpp:17:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
17 | while (m--) scanf("%d %d %lld", &x, &y, &z), v[x].emplace_back(y, z), v[y].emplace_back(x, z), d[x][y] = d[y][x] = z;
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~