이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "game.h"
#include <algorithm>
#include <queue>
using namespace std;
int a[1505], N;
bool b[1501][1501];
void initialize(int n){ N=n; for (int i=2; i<=n; i++)a[i]=1; }
int hasEdge(int u, int v){
int e=0;
if(a[u])swap(v, u);
if(!a[u]){
a[v]--;
if(!a[v]) for (int i=1; i<=N; i++)a[i]+=(!b[v][i]&&(i!=v));
}else b[v][u]=b[u][v]=1;
return e;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |