# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
1228785 | ericl23302 | 수천개의 섬 (IOI22_islands) | C++20 | 0 ms | 0 KiB |
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;
std::variant<bool, std::vector<int>> find_journey(int N, int M, std::vector<int> U, std::vector<int> V) {
vector<vector<int>> boats(2);
for (int i = 0; i < M; ++i) boats[U[i]].push_back(i);
if (boats[0].size() < 2 || boats[1].size() < 1) return false;
return {boats[0][0], boats[1][0], boats[0][1], boats[0][0], boats[1][0], boats[0][1]};
}