제출 #834923

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
8349232023-08-23 02:12:26Username4132수천개의 섬 (IOI22_islands)C++17
31 / 100
45 ms37572 KiB
#include "islands.h"
#include <variant>
#include <iostream>
#include <vector>
#include <algorithm>
#include <cassert>
using namespace std;
using pii = pair<int, int>;
#define forn(i, n) for(int i=0; i<(int)n; ++i)
#define forsn(i, s, n) for(int i=s; i<(int)n; ++i)
#define dforn(i, n) for(int i=(int)n-1; i>=0; --i)
#define dforsn(i, s, n) for(int i=(int)n-1; i>=s; --i)
#define PB push_back
#define F first
#define S second
const int MAXN = 100010;
int n, m, uv, ue, cur, stpos[MAXN];
bool vis[MAXN], blocked[MAXN], inst[MAXN];
vector<int> st, se, stt, see, t1, t2, c1, c2, v1, v2, ans;
vector<pii> g[MAXN];
void build(vector<int>& stv, vector<int>& ste, int v, int e, vector<int>& c, vector<int>& t, vector<int>& a, int th){
int pos=0;
while(stv[pos]!=v) ++pos;
forsn(i, th, pos) t.PB(ste[i]);
forsn(i, pos, ste.size()) c.PB(ste[i]), a.PB(stv[i]);
c.PB(e);
a.PB(stv.back());
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#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...