제출 #349258

#제출 시각아이디문제언어결과실행 시간메모리
349258David_M게임 (IOI14_game)C++14
100 / 100
450 ms9324 KiB
#include "game.h" #include <algorithm> #include <queue> using namespace std; short 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){ b[v][u]=b[u][v]=1; if(a[u])swap(v, u); if(!a[u]&&!(--a[v])){ for (int i=0; i<N; i++)if(a[i])a[i]+=!b[v][i]; return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...