Submission #628523

#TimeUsernameProblemLanguageResultExecution timeMemory
628523c28dnv9q3Thousands Islands (IOI22_islands)C++17
5 / 100
104 ms12740 KiB
#include "islands.h" #include <variant> #include <vector> #include <map> using namespace std; variant<bool, vector<int>> find_journey( int N, int M, vector<int> U, vector<int> V) { map<pair<int,int>, int> m; for (int i = 0; i < M; i++) m[{U[i], V[i]}] = i; if (N < 3) return false; int c0 = m[{0,1}]; int c1 = m[{1,0}]; int c2 = m[{1,2}]; int c3 = m[{2,1}]; int c4 = m[{2,0}]; int c5 = m[{0,2}]; return vector<int>{ c0, c2, c4, c5, c3, c1, c4, c2, c0, c1, c3, c5 }; }
#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...