실행 실패 (제출 코드 컴파일 에러)
Main.cpp:4:8: error: ‘pair’ was not declared in this scope 4 | vector<pair<int, int>> tree[MAX]; | ^~~~ Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:8: error: ‘pair’ was not declared in this scope Main.cpp:4:1: error: ‘vector’ does not name a type 4 | vector<pair<int, int>> tree[MAX]; | ^~~~~~ Main.cpp: In function ‘void dfs(int, int, int)’: Main.cpp:14:27: error: ‘tree’ was not declared in this scope 14 | for (auto [next, w] : tree[curr]) { | ^~~~ Main.cpp: In function ‘int lca(int, int)’: Main.cpp:28:30: error: ‘swap’ was not declared in this scope 28 | if (depth[u] < depth[v]) swap(u, v); | ^~~~ Main.cpp: In function ‘int main()’: Main.cpp:46:5: error: ‘cin’ was not declared in this scope 46 | cin >> N >> M; | ^~~ Main.cpp:51:9: error: ‘tree’ was not declared in this scope 51 | tree[u].push_back({v, w}); | ^~~~ Main.cpp:62:9: error: ‘cout’ was not declared in this scope 62 | cout << dist[u] + dist[v] - 2 * dist[anc] << '\n'; | ^~~~
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.