제출 #837240

#제출 시각아이디문제언어결과실행 시간메모리
837240Sohsoh84수천개의 섬 (IOI22_islands)C++17
6.75 / 100
29 ms6084 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; const int MAXN = 400 + 10; int deg[MAXN], n, m, W[MAXN][MAXN]; vector<int> f[MAXN]; variant<bool, vector<int>> find_journey(int n_, int m_, vector<int> U_, vector<int> V_) { n = n_; m = m_; for (int i = 0; i < m; i++) { deg[U_[i]]++, f[U_[i]].push_back(i); W[U_[i]][V_[i]] = i; } if (n == 2) { if (deg[0] >= 2 && deg[1] >= 1) return vector<int>({f[0][0], f[1][0], f[0][1], f[0][0], f[1][0], f[0][1]}); return false; } return vector<int>({W[0][1], W[1][2], W[2][0], W[0][2], W[2][1], W[1][0], W[0][1], W[1][2], W[2][0], W[0][2], W[2][1], W[1][0]}); }
#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...