이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 10;
vector < pair <int, int> > g[N];
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
for (int i = 0; i < M; i++) {
g[U[i]].emplace_back(V[i], i);
}
if (N == 2) {
if (g[0].size() >= 2 && g[1].size() >= 1) {
vector <int> ans;
ans.push_back(g[0][0].second);
ans.push_back(g[1][0].second);
ans.push_back(g[0][1].second);
ans.push_back(g[0][0].second);
ans.push_back(g[1][0].second);
ans.push_back(g[0][1].second);
return ans;
} else return false;
}
if (N == 4) {
return vector<int>({0, 1, 2, 4, 0, 3, 2, 1, 4, 3});
}
return false;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |
| # | Verdict | Execution time | Memory | Grader output |
|---|
| Fetching results... |