이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;
using ll = long long;
variant<bool, vector<int>> find_journey(int N, int M, vector<int> U, vector<int> V) {
if (N == 2) {
vector<vector<int>> boat(2);
for (int i = 0;i < M;i++) boat[U[i]].push_back(i);
if ((int)boat[0].size() < 2 || (int)boat[1].size() < 1) return false;
vector<int> ans = { boat[0][0], boat[1][0], boat[0][1], boat[0][0], boat[1][0], boat[0][1] };
return ans;
}
int n = N;
vector<vector<int>> boat(n, vector<int>(n, 0));
for (int i = 0;i < M;i++) {
boat[U[i]][V[i]] = i;
}
vector<int> ans = { boat[0][1], boat[1][0],
boat[0][2], boat[2][1], boat[0][1], boat[1][0],
boat[2][1], boat[0][2] };
return ans;
}
# | 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... |