Submission #290551

#TimeUsernameProblemLanguageResultExecution timeMemory
290551verngutzGame (IOI14_game)C++14
15 / 100
1 ms384 KiB
#include "game.h" const int N = 1500; int num_no[N+1], total_no = 0, sz; void initialize(int n) { sz = n; } int hasEdge(int u, int v) { bool yes = num_no[u] == sz - 2 or num_no[v] == sz - 2 or total_no == sz * (sz - 1) / 2 - (sz - 1); num_no[u] += not yes; num_no[v] += not yes; total_no += not yes; return yes; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...