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;
const int N = 1600;
set<long long> g[N];
void initialize(int n) {
for(long long i = n-1; i >= 0; i--){
for(long long j = 0; j < i; j++){
g[i].insert(j);
g[j].insert(i);
}
}
}
int hasEdge(int u, int v) {
if(u < v)swap(u, v);
if(g[u].size() == 1)return 1;
g[u].erase(v);
g[v].erase(u);
return 0;
}
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|
Fetching results... |