제출 #1187734

#제출 시각아이디문제언어결과실행 시간메모리
1187734ByeWorld수천개의 섬 (IOI22_islands)C++20
5 / 100
17 ms4420 KiB
#include "islands.h" #include <bits/stdc++.h> #include <variant> #include <vector> #define ll long long #define pb push_back #define fi first #define se second #define lf ((id<<1)) #define rg ((id<<1)|1) #define md ((l+r)>>1) using namespace std; const int MAXN = 2e5+10; int n, m; int u[MAXN], v[MAXN]; vector<int> ANS; std::variant<bool, std::vector<int>> find_journey( int N, int M, std::vector<int> U, std::vector<int> V) { n = N; m = M; int a,b,c,d,e,f; for(int i=0; i<m; i++){ u[i] = U[i], v[i] = V[i]; if(u[i]==0&&v[i]==1) a = i; if(u[i]==1&&v[i]==0) b = i; if(u[i]==1&&v[i]==2) c = i; if(u[i]==2&&v[i]==1) d = i; if(u[i]==2&&v[i]==0) e = i; if(u[i]==0&&v[i]==2) f = i; } if(n >= 3){ ANS.pb(a); ANS.pb(c); ANS.pb(e); ANS.pb(f); ANS.pb(d); ANS.pb(b); ANS.pb(e); ANS.pb(c); ANS.pb(a); ANS.pb(b); ANS.pb(d); ANS.pb(f); return ANS; } return false; }
#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...