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>
using namespace std;
#define ll long long
#define ff first
#define ss second
#define pb push_back
#define mk make_pair
int n;
map<int,int> mp;
int parent[2000];
int num_child[2000];
vector<pair<int,int > > p;
int find(int node) {
if(parent[node] == node) return node;
return parent[node] = find(parent[node]);
}
void initialize(int N) {
n = N;
for(int i = 0; i < n; i ++) {
parent[i] = i;
num_child[i] = 1;
}
}
bool check[2000];
int hasEdge(int u, int v) {
mp[u] ++;
mp[v] ++;
if(mp[u] == n - 1 && check[u] == 0) {
check[u] = 1;
return 1;
}
if(mp[v] == n - 1 && check[v] == 0) {
check[v] = 1;
return 1;
}
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... |