Submission #628315

#TimeUsernameProblemLanguageResultExecution timeMemory
628315MarkBcc168Thousands Islands (IOI22_islands)C++17
10 / 100
33 ms6076 KiB
#include <bits/stdc++.h> using namespace std; std::variant<bool, std::vector<int>> find_journey( int n, int m, std::vector<int> u, std::vector<int> v){ assert(n<=400); if(n==2){ vector<int> a, b; for(int i=0;i<m;++i){ if(u[i]==0) a.push_back(i); if(u[i]==1) b.push_back(i); } if(a.size() < 2 || b.size() < 1) return false; else return vector<int>{a[0], b[0], a[1], a[0], b[0], a[1]}; } else{ int e[n][n]; for(int i=0; i<m; ++i){ e[u[i]][v[i]] = i; } return vector<int>{e[0][1], e[1][2], e[2][0], e[0][2], e[2][1], e[1][0], e[2][0], e[1][2], e[0][1], e[1][0], e[2][1], e[0][2]}; } }
#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...