Submission #893177

#TimeUsernameProblemLanguageResultExecution timeMemory
893177Trisanu_DasThousands Islands (IOI22_islands)C++17
10 / 100
25 ms5328 KiB
#include<bits/stdc++.h> #include "islands.h" using namespace std; variant<bool, vector<int> > find_journey(int N, int M, vector<int> U, vector<int> V){ if(N == 2){ vector<int> v0, v1; for(int i = 0; i < M; i++){ if(U[i]==0) v0.push_back(i); else v1.push_back(i); } if(v0.size() < 2 || v1.size() < 1) return false; return vector<int>{v0[0], v1[0], v0[1], v0[0], v1[0], v0[1]}; } if(N <= 400){ int p[N + 5][N + 5]; for(int i = 0; i < M; i++) p[U[i]][V[i]]=i; return vector<int>{p[0][1],p[1][0],p[0][2],p[2][0],p[1][0],p[0][1],p[2][0],p[0][2]}; } return false; }
#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...