실행 실패 (제출 코드 컴파일 에러)
Main.cpp: In constructor ‘Tree::Tree(std::vector<std::vector<std::pair<int, int> > >)’: Main.cpp:11:27: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector<std::vector<std::pair<int, int> > >::size_type’ {aka ‘long unsigned int’} [-Wsign-compare] 11 | for (int i = 1; i < graph.size(); i++) { | ~~^~~~~~~~~~~~~~ Main.cpp: In member function ‘int Tree::get_depth(int)’: Main.cpp:23:37: error: cannot convert ‘__gnu_cxx::__alloc_traits<std::allocator<std::pair<int, int> >, std::pair<int, int> >::value_type’ {aka ‘std::pair<int, int>’} to ‘int’ 23 | depth[i] = get_depth(parent[i]) + 1; | ~~~~~~~~~^~~~~~~~~~~ Main.cpp:18:23: note: initializing argument 1 of ‘int Tree::get_depth(int)’ 18 | int get_depth(int i) { | ~~~~^ Main.cpp: In function ‘int main()’: Main.cpp:81:21: error: expected primary-expression before ‘.’ token 81 | cout << Tree.get_distance(a, b) << '\n'; | ^
정답 개수:
-
틀린 개수:
-
실행 실패 개수:
-
반례를 발견하지 못했습니다.