답안 #380896

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
380896 2021-03-23T14:02:24 Z knightron0 게임 (IOI14_game) C++14
0 / 100
1 ms 364 KB
#include <bits/stdc++.h>
#include "game.h"
using namespace std;
int cnt[1503];
bool done[1506];
int N;

void initialize(int n){
	for(int i= 0;i<=n+1;i++){
		cnt[i] =0;
		done[i] = 0;
	}
	N = n;
}

int hasEdge(int u, int v){
	if((cnt[u] == N-2 && done[u] == 0) || (cnt[v] == N-2 && done[v] == 0)){
		cnt[u]++;
		cnt[v]++;
		done[u] = 1;
		done[v] = 1;
		return 1;
	}
	cnt[u]++;
	cnt[v]++;
	done[u] = 1;
	done[v] = 1;
	return 0;
}


// signed main() {
//     ios_base::sync_with_stdio(false);
//     cin.tie(NULL);
//     #ifdef LOCAL
//     freopen("input.txt", "r", stdin);
//     #endif
    
//     return 0;
// }



# 결과 실행 시간 메모리 Grader output
1 Incorrect 1 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 -