Submission #1051192

#TimeUsernameProblemLanguageResultExecution timeMemory
1051192TrentThousands Islands (IOI22_islands)C++17
6.75 / 100
17 ms5584 KiB
#include "islands.h" #include "bits/stdc++.h" using namespace std; #define forR(i, x) for(int i = 0; i < (x); ++i) #define REP(i, a, b) for(int i = (a); i < (b); ++i) #define all(x) x.begin(), x.end() typedef long long ll; typedef vector<int> vi; typedef vector<vi> vvi; typedef vector<ll> vll; typedef vector<bool> vb; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { if(N == 2) { vi c0, c1; forR(i, M) { if(U[i] == 0) c0.push_back(i); else c1.push_back(i); } if(c0.size() < 2 || c1.size() < 1) return false; else { return vector<int> {c0[0], c1[0], c0[1], c0[0], c1[0], c0[1]}; } } }

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:26:1: warning: control reaches end of non-void function [-Wreturn-type]
   26 | }
      | ^
#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...