#include "game.h"
#include <algorithm>
using namespace std;
int N;
int a[1510][1510];
void initialize(int n) {
N = n;
int i,j;
for(i=1; i<=N; i++){
for(j=1; j<=N; j++){
a[i][j] = -1;
}
}
}
int hasEdge(int u, int v) {
int i;
u++; v++;
for(i=1; i<=N; i++){
if(a[u][i] == 1){
if(a[v][i] == -1) return 0;
}
}
a[u][v] = a[v][u] = 1;
return 1;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
18780 KB |
Output is correct |
2 |
Incorrect |
0 ms |
18780 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
18780 KB |
Output is correct |
2 |
Incorrect |
0 ms |
18780 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
0 ms |
18780 KB |
Output is correct |
2 |
Incorrect |
0 ms |
18780 KB |
Output isn't correct |
3 |
Halted |
0 ms |
0 KB |
- |