# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
797645 | XJP12 | 수천개의 섬 (IOI22_islands) | C++17 | 0 ms | 0 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include<bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef vector<int> vi;
typedef vector<vi> vii;
variant<bool,vector<int>> find_journey(int n, int m, vector<int> u, vector<int> v){
if(n<3){
return false;
}
int a=-1,b=-1,c=-1,d=-1;
int peanut1=-1, peanut2=-1;
for(int i=0; i<m; i++){
if(u[i]==0){
if(peanut1==-1){
a=i;
peanut1=v[i];
}else{
b=i;
peanut2=v[i];
break;
}
}
}
for(int i=0; i<m; i++){
if(u[i]==peanut1){
if(v[i]==0){
c=i;
break;
}
}
}
for(int i=0; i<m; i++){
if(u[i]==peanut2){
if(v[i]==0){
d=i;
break;
}
}
}
vector<int> x(8);
if(ban==true && ban1>1){
x={a,c,b,d,c,a,d,b};
return x;
}
}