제출 #654841

#제출 시각아이디문제언어결과실행 시간메모리
654841aryan12수천개의 섬 (IOI22_islands)C++17
5 / 100
30 ms3040 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; variant<bool, vector<int> > find_journey(int N, int M, vector<int> U, vector<int> V) { if(N == 2) return false; vector<int> c1, c2; int idx[6] = {-1, -1, -1, -1, -1, -1}; for(int i = 0; i < M; i++) { if(U[i] == 0 && V[i] == 1) { idx[0] = i; } if(V[i] == 0 && U[i] == 1) { idx[1] = i; } if(U[i] == 1 && V[i] == 2) { idx[2] = i; } if(V[i] == 1 && U[i] == 2) { idx[3] = i; } if(U[i] == 2 && V[i] == 0) { idx[4] = i; } if(V[i] == 2 && U[i] == 0) { idx[5] = i; } } return vector<int>({idx[0], idx[2], idx[4], idx[5], idx[2], idx[0], idx[4], idx[5]}); // if true return vector<int>({0, 1, 2}); // if false 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...