Submission #1037550

#TimeUsernameProblemLanguageResultExecution timeMemory
1037550sleepntsheepThousands Islands (IOI22_islands)C++17
0 / 100
2 ms604 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]]++,a[V[i]]++; if (N==2){ if(a[0]%2==0&&a[1]%2==0 && 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...