Submission #1037555

#TimeUsernameProblemLanguageResultExecution timeMemory
1037555sleepntsheepThousands Islands (IOI22_islands)C++17
1.75 / 100
19 ms3536 KiB
#include "islands.h" #include <variant> #include <vector> using namespace std; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { vector<int> a(N); for (int i = 0; i < M; ++i) a[U[i]]++; if (N==2){ if(a[0]>=2&&a[1]>=1)return true; if(min(a[0],a[1])>=2)return true; 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:9:20: warning: control reaches end of non-void function [-Wreturn-type]
    9 |     vector<int> a(N);
      |                    ^
#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...