Submission #814487

#TimeUsernameProblemLanguageResultExecution timeMemory
814487LIFThousands Islands (IOI22_islands)C++17
3.50 / 100
28 ms4380 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;*/ }

Compilation message (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...