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:13:27: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
13 | for (auto &e: c) scanf("%d", &e);
| ~~~~~^~~~~~~~~~
cities.cpp:16:22: warning: ignoring return value of 'int scanf(const char*, ...)' declared with attribute 'warn_unused_result' [-Wunused-result]
16 | while (m--) scanf("%d %d %lld", &x, &y, &z), d[x][y] = min(d[x][y], z), d[y][x] = min(d[y][x], z);
| ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~