# | Submission time | Handle | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20247 | 2016-07-29T07:21:00 Z | Angelos | Game (IOI14_game) | C++ | 0 ms | 0 KB |
#include "game.h" #include <bits/stdc++.h> void initialize(int n) { // DO NOTHING! } int c[1500],N; int hasEdge(int u, int v) { return ++c[u > v ? u : v] == (u > v ? u : v); } int main(){ std::cin >> N; for(int i=0; i<N*(N+1)/2; i++){ int u,v; std::cin >> u >> v; std::cout << hasEdge(u,v) << '\n'; } return 0; }