Submission #120857

#TimeUsernameProblemLanguageResultExecution timeMemory
120857PlurmGame (IOI14_game)C++11
0 / 100
2 ms384 KiB
#include "game.h" #include <algorithm> using namespace std; int N; void initialize(int n) { N = n; } int ucnt; bool used[1505]; int hasEdge(int u, int v) { if(used[u] && used[v]) return 1; if(!used[u] && !used[v]){ if(ucnt < N-2){ used[u] = true; used[v] = true; ucnt += 2; return 1; }else{ return 0; } } if(used[u] && !used[v]) swap(u,v); if(ucnt < N-1){ used[u] = true; ucnt++; return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...