# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
20247 | Angelos | Game (IOI14_game) | C++98 | 0 ms | 0 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#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;
}