Submission #1212595

#TimeUsernameProblemLanguageResultExecution timeMemory
1212595qwushaThousands Islands (IOI22_islands)C++20
0 / 100
18 ms4284 KiB
#include <bits/stdc++.h> #include "islands.h" using namespace std; #define fi first #define se second typedef long long ll; typedef long double ld; mt19937 rnd(chrono::high_resolution_clock::now().time_since_epoch().count()); int inf = 1e9; #include <variant> #include <vector> variant<bool, vector<int>> find_journey( int n, int m, std::vector<int> u, std::vector<int> v) { vector<int> ze, on; for (int i = 0; i < m; i++) { if (u[i] == 0) { ze.push_back(i); } else { on.push_back(i); } } if (ze.size() >= 2 && on.size() >= 1) { return vector<int>({ze[0], on[0], ze[1], ze[0], on[0], ze[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:25:1: warning: control reaches end of non-void function [-Wreturn-type]
   25 | }
      | ^
#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...