제출 #837517

#제출 시각아이디문제언어결과실행 시간메모리
837517tengiz05수천개의 섬 (IOI22_islands)C++17
10 / 100
36 ms48340 KiB
#include "islands.h" #include <bits/stdc++.h> using namespace std; std::variant<bool, vector<int>> find_journey(int n, int m, vector<int> U, vector<int> V) { if (n == 2) { vector<int> e[n]; for (int i = 0; i < m; i++) { e[U[i]].push_back(i); } if (e[0].size() >= 2 && e[1].size() >= 1) { return vector<int>{e[0][0], e[1][0], e[0][1], e[0][0], e[1][0], e[0][1]}; } else { return false; } } vector<int> e[n][n]; for (int i = 0; i < m; i++) { e[U[i]][V[i]].push_back(i); } return vector<int>{e[0][1][0], e[1][2][0], e[2][0][0], e[0][2][0], e[2][1][0], e[1][0][0], e[2][0][0], e[1][2][0], e[0][1][0], e[1][0][0], e[2][1][0], e[0][2][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...