Submission #807450

#TimeUsernameProblemLanguageResultExecution timeMemory
807450OzyThousands Islands (IOI22_islands)C++17
5 / 100
26 ms4416 KiB
#include "islands.h" #include <bits/stdc++.h> #include <variant> using namespace std; #define lli long long int #define debug(a) cout << #a << " = " << a << endl #define debugsl(a) cout << #a << " = " << a << ", " #define rep(i,a,b) for(int i = (a); i <= (b); i++) #define repa(i,a,b) for(int i = (a); i >= (b); i--) #define pll pair<lli,lli> vector<int> camino; lli a,b,c,d,n; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { n = N; if (n == 2) return false; rep(i,0,M-1) { if (U[i] == 0 && V[i] == 1) a = i; if (U[i] == 1 && V[i] == 0) b = i; if (U[i] == 0 && V[i] == 2) c = i; if (U[i] == 2 && V[i] == 0) d = i; } camino.push_back(a); camino.push_back(b); camino.push_back(c); camino.push_back(d); camino.push_back(b); camino.push_back(a); camino.push_back(d); camino.push_back(c); return camino; }
#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...