Submission #1033299

#TimeUsernameProblemLanguageResultExecution timeMemory
1033299enderGame (IOI14_game)C++17
15 / 100
1 ms604 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; const int N = 1502; vector<int> cnt(N, 1); vector<bool> mark(N, false); int actn; int r; int cont = 0; void initialize(int n) { actn = n; r = ((n-1)*n)/2; } int hasEdge(int u, int v) { if(cont == r/2) return 1; if((cnt[u] == actn-1) || (cnt[v] == actn-1)){ mark[u] = true; mark[v] = true; cnt[u]++; cnt[v]++; return 1; } else { cont++; cnt[u]++; cnt[v]++; return 0; } }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...