제출 #1062160

#제출 시각아이디문제언어결과실행 시간메모리
1062160andrei_iorgulescu게임 (IOI14_game)C++14
0 / 100
1 ms344 KiB
#include <bits/stdc++.h> #include "game.h" #warning That's not FB, that's my FB using namespace std; int n; int sz[1505], t[1505], nre[1505]; void initialize(int N) { n = N; for (int i = 1; i <= n; i++) t[i] = i, sz[i] = 1, nre[i] = 0; } int par(int x) { if (x == t[x]) return x; return par(t[x]); } void join(int u, int v) { u = par(u); v = par(v); if (u == v) { nre[u]++; return; } if (sz[u] < sz[v]) swap(u,v); sz[u] += sz[v]; nre[u] += nre[v] + 1; t[v] = u; } int hasEdge(int u, int v) { u++; v++; join(u,v); int xx = par(u); if (nre[xx] == sz[xx] * (sz[xx] - 1) / 2) return 1; return 0; }

컴파일 시 표준 에러 (stderr) 메시지

game.cpp:3:2: warning: #warning That's not FB, that's my FB [-Wcpp]
    3 | #warning That's not FB, that's my FB
      |  ^~~~~~~
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...