답안 #349255

# 제출 시각 아이디 문제 언어 결과 실행 시간 메모리
349255 2021-01-17T09:18:10 Z David_M 게임 (IOI14_game) C++14
0 / 100
0 ms 364 KB
#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 -