이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "game.h"
#include <assert.h>
constexpr int MAX = 1507;
int node, ctr, edge;
int fq[MAX] = {};
void initialize(int n) {
node = n; ctr = edge = 0;
for (int i = 1; i <= n; ++i)
fq[i] = 0;
}
int hasEdge(int u, int v) {
ctr++;
fq[u]++, fq[v]++;
if (fq[u] == node-1 || fq[v] == node-1)
{
edge++;
return 1;
}
if (ctr-1 + node - 1 - edge == node * (node - 1) / 2)
{
edge++;
return 1;
}
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |