제출 #744276

#제출 시각아이디문제언어결과실행 시간메모리
744276kwongweng수천개의 섬 (IOI22_islands)C++17
5 / 100
32 ms5168 KiB
#include "islands.h"
#include <bits/stdc++.h>
using namespace std;

typedef long long ll;
typedef vector<int> vi;
typedef pair<int, int> ii;
typedef vector<ii> vii;
typedef long double ld;
typedef pair<ll, ll> pll;
#define FOR(i, a, b) for(int i = a; i < b; i++)
#define ROF(i, a, b) for(int i = a; i >= b; i--)
#define ms memset
#define pb push_back
#define fi first
#define se second

variant<bool, vi> find_journey(int N, int M, vi U, vi V) {
  if (N == 2){
    vi e0, e1;
    FOR(i,0,M){
      if (U[i]==0) e0.pb(i);
      else e1.pb(i);
    }
    if (e0.size() < 2 || e1.size() < 1) return false;
    return vi({e0[0], e1[0], e0[1], e0[0], e1[0], e0[1]});
  }  
  if (N == 4) {
    return std::vector<int>({0, 1, 2, 4, 0, 3, 2, 1, 4, 3});
  }
  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...