제출 #835043

#제출 시각아이디문제언어결과실행 시간메모리
835043pavement수천개의 섬 (IOI22_islands)C++17
5 / 100
20 ms2700 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; #define pb push_back #define eb emplace_back using ii = pair<int, int>; variant<bool, vector<int> > find_journey(int N, int M, vector<int> U, vector<int> V) { if (N == 2) { return false; } int e1 = -1, e2 = -1, e3 = -1, e4 = -1, e5 = -1, e6 = -1; for (int i = 0; i < M; i++) { if (U[i] == 0 && V[i] == 1) { e1 = i; } else if (U[i] == 1 && V[i] == 2) { e2 = i; } else if (U[i] == 2 && V[i] == 0) { e3 = i; } else if (U[i] == 1 && V[i] == 0) { e4 = i; } else if (U[i] == 2 && V[i] == 1) { e5 = i; } else if (U[i] == 0 && V[i] == 2) { e6 = i; } } assert(min({e1, e2, e3, e4, e5, e6}) != -1); auto ret = {e1, e2, e3, e6, e5, e4, e3, e2, e1, e4, e5, e6}; return ret; }
#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...