Submission #518720

#TimeUsernameProblemLanguageResultExecution timeMemory
518720timreizinGame (IOI14_game)C++17
15 / 100
1 ms280 KiB
#include "game.h" #include <vector> using namespace std; vector<int> counter; int n, times = 0; pair<int, int> start; bool wasPair = false; void initialize(int _n) { counter.resize(n + 1); n = _n; } int hasEdge(int u, int v) { ++times; if (u > v) swap(u, v); if (times == 1) { start = {u, v}; return 1; } if (times == 5) { if (wasPair) return 0; return 1; } if (u != start.first && u != start.second && v != start.first && v != start.second) { wasPair = true; return 1; } return 0; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...