Submission #64881

#TimeUsernameProblemLanguageResultExecution timeMemory
64881MatheusLealVGame (IOI14_game)C++17
15 / 100
10 ms1096 KiB
#include <bits/stdc++.h> #define maxn 1550 using namespace std; typedef long long ll; int block[maxn], n, ligacoes, faltam; int hasEdge(int u, int v) { if(block[u] == n - 2 || block[v] == n - 2 || ligacoes >= faltam) { ligacoes --; faltam --; return 1; } block[u] ++, block[v] ++; faltam --; return 0; } void initialize(int N_) { n = N_; faltam = n*(n - 1)/2; ligacoes = n - 1; memset(block, 0, sizeof block); }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...