Submission #349257

#TimeUsernameProblemLanguageResultExecution timeMemory
349257David_MGame (IOI14_game)C++14
100 / 100
403 ms9964 KiB
#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){ b[v][u]=b[u][v]=1; if(a[u])swap(v, u); if(!a[u])if(!(--a[v])){ for (int i=0; i<N; i++)a[i]+=(!b[v][i]&&(i!=v)&&a[i]); return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...