Submission #807472

#TimeUsernameProblemLanguageResultExecution timeMemory
807472OzyThousands Islands (IOI22_islands)C++17
5 / 100
26 ms4176 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; a = -1; b = -1; c = -1; rep(i,0,M-1) { if (U[i] == 0 && V[i] == 1) { if(a == -1) a = i; else c = i; } if (U[i] == 1 && V[i] == 0) b = i; } if(a == -1 || b == -1 || c == -1) return false; camino.push_back(a); camino.push_back(b); camino.push_back(c); camino.push_back(a); camino.push_back(b); 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...