제출 #963171

#제출 시각아이디문제언어결과실행 시간메모리
963171MuntherCarrot게임 (IOI14_game)C++14
0 / 100
1 ms444 KiB
#include <bits/stdc++.h> #include "game.h" using namespace std; const int MAXN = 1505; int fth[MAXN]; int find(int u){ return u == fth[u] ? u : fth[u] = find(fth[u]); } void merge(int u, int v){ u = find(u); v = find(v); fth[v] = u; } void initialize(int n){ iota(fth, fth + MAXN, 0); } int hasEdge(int u, int v){ if(find(u) == find(v)){ return 0; } merge(u, v); return 1; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...