# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
332029 | 2020-12-01T08:49:32 Z | zggf | Game (IOI14_game) | C++14 | 0 ms | 0 KB |
#include "game.h" vector<int> tab; void initialize(int n) { tab.resize(n+1, n-1); } int hasEdge(int u, int v) { tab[u]--; tab[v]--; if(tab[u]==0||tab[v]==0) {tab[u]=-1; tab[v]=-1; return 1;} return 0; }