Submission #1187588

#TimeUsernameProblemLanguageResultExecution timeMemory
1187588ByeWorldThousands Islands (IOI22_islands)C++20
6.75 / 100
19 ms4464 KiB
#include "islands.h" #include <bits/stdc++.h> #include <variant> #include <vector> #define ll long long #define pb push_back #define fi first #define se second #define lf ((id<<1)) #define rg ((id<<1)|1) #define md ((l+r)>>1) using namespace std; int n, m; vector<int> ANS; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { n = N; m = M; vector<int>le, ri; for(int i=0; i<m; i++){ if(U[i] == 0) le.pb(i); else ri.pb(i); } if(le.size() >= 2 && ri.size() >= 1){ ANS.pb(le[0]); ANS.pb(ri[0]); ANS.pb(le[1]); ANS.pb(le[0]); ANS.pb(ri[0]); ANS.pb(le[1]); return ANS; } return false; }
#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...