Submission #633896

#TimeUsernameProblemLanguageResultExecution timeMemory
633896CauchicoThousands Islands (IOI22_islands)C++17
5 / 100
29 ms3128 KiB
#include <variant> #include <bits/stdc++.h> using namespace std; variant<bool,vector<int>> find_journey( int n, int m, vector<int> u, vector<int> v) { int u1=-1,v1=-1,u2=-1,v2=-1,u3=-1,v3=-1; if (n==2) { return false; } for (int i=0;i<m;i++) { if (u[i] == 0 and v[i] == 1) { u1 = i; } if (u[i] == 1 and v[i] == 2) { u2 = i; } if (u[i] == 2 and v[i] == 0) { u3 = i; } if (u[i] == 1 and v[i] == 0) { v1 = i; } if (u[i] == 2 and v[i] == 1) { v2 = i; } if (u[i] == 0 and v[i] == 2) { v3 = i; } } vector<int> ans = {u1,u2,u3,v3,v2,v1,u3,u2,u1,v1,v2,v3}; return ans; }
#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...