Submission #726377

#TimeUsernameProblemLanguageResultExecution timeMemory
7263771neGame (IOI14_game)C++14
0 / 100
0 ms212 KiB
#include "game.h" #include <bits/stdc++.h> using namespace std; vector<set<int>>adj; vector<int>res; vector<vector<int>>connected; void initialize(int n) { adj.resize(n); res.resize(n,n - 1); connected.resize(n,vector<int>(n,0)); } int hasEdge(int u, int v) { if (connected[u][v])return 1; if ((res[u] == 1 && res[v] >= 1) || (res[v] == 1 && res[u] >= 1)){ connected[u][v] = 1; connected[v][u] = 1; res[u]--; res[v]--; } return connected[u][v]; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...