/in/foo.cc: In function 'void dfs(int, int)':
/in/foo.cc:25:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (d[i]>n) break; sum = max(sum, i);
^~
/in/foo.cc:25:22: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the 'if'
if (d[i]>n) break; sum = max(sum, i);
^~~
/in/foo.cc: In function 'int main()':
/in/foo.cc:48:2: error: 'cin' was not declared in this scope
cin >> n >> k;
^~~
/in/foo.cc:53:3: error: 'cout' was not declared in this scope
cout << tag[i] << ' ';
^~~~
/in/foo.cc:55:2: error: 'cout' was not declared in this scope
cout << endl;
^~~~
/in/foo.cc:55:10: error: 'endl' was not declared in this scope
cout << endl;
^~~~