Submission #553062

#TimeUsernameProblemLanguageResultExecution timeMemory
553062physics07Game (IOI14_game)C++17
0 / 100
1 ms212 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; typedef long long ll; int cnt, a[1501], n, key; bool b; void initialize(int q) { n=q; } int hasEdge(int u, int v) { cnt+=!a[u]+!a[v]; int ans=0; if(!b && cnt==n) { b=1; ans=0; if(!a[u]) key=u; else key=v; } else if(cnt<n) ans=1; else { if(u==key || v==key) ans=0; else ans=1; } a[u]=a[v]=1; return ans; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...