# | Time | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
926885 | Nurislam | Game (IOI14_game) | C++17 | 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<bits/stdc++.h>
using namespace std;
#include<bits/stdc++.h>
#define int long long
const int N = 1600;
set<int> g[N];
void initialize(int n) {
for(int i = 0; i < n; i++){
for(int j = i+1; j < n; j++){
g[i].insert(j);
g[j].insert(i);
}
}
}
int hasEdge(int u, int v) {
if(g[u].size() == 1)return 1;
g[u].erase(v);
g[v].erase(u);
return 0;
}