제출 #814491

#제출 시각아이디문제언어결과실행 시간메모리
814491LIF수천개의 섬 (IOI22_islands)C++17
3.50 / 100
28 ms3496 KiB
#include "islands.h" #include <variant> #include <vector> int ind[300005]; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { if(N == 2) { for(int i=0;i<M;i++) { ind[U[i]]++; } if(ind[0] >= 2 && ind[1] >= 1)return true; return false; } /* if (N == 4) { return std::vector<int>({0, 1, 2, 4, 0, 3, 2, 1, 4, 3}); } return false;*/ }

컴파일 시 표준 에러 (stderr) 메시지

islands.cpp: In function 'std::variant<bool, std::vector<int, std::allocator<int> > > find_journey(int, int, std::vector<int>, std::vector<int>)':
islands.cpp:24:1: warning: control reaches end of non-void function [-Wreturn-type]
   24 | }
      | ^
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...