#include "game.h"
#include <algorithm>
#include <queue>
using namespace std;
int a[1500], N;
bool b[1500][1500];
void initialize(int n){ N=n; for (int i=1; i<n; i++)a[i]=1; }
int hasEdge(int u, int v){
bool e=0;
if(a[u])swap(v, u);
if(!a[u]){
a[v]--;
if(!a[v]){ e=1; for (int i=0; i<N; i++)a[i]+=(!b[v][i]&&(i!=v)); }
}else b[v][u]=b[u][v]=1;
return e;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Incorrect |
0 ms |
364 KB |
Output isn't correct |
2 |
Halted |
0 ms |
0 KB |
- |