# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1122154 | inksamurai | Pictionary (COCI18_pictionary) | C++17 | 82 ms | 9288 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>
#define pii pair<int,int>
#define fi first
#define se second
using namespace std;
int par[300000], siz[300000];
int get_parent(int v){
if(v == par[v]){
return v;
}
return par[v] = get_parent(par[v]);
}
void merge(int u, int v){
int parent_u = get_parent(u);
int parent_v = get_parent(v);
if(parent_u == parent_v) return;
if(siz[parent_u] < siz[parent_v]){
swap(parent_u, parent_v);
}
par[parent_v] = parent_u;
siz[parent_u] += siz[parent_v];
}
//bool ask(int n, int m, int j, int u, int v){
// for(int i = 0; i <= n; i++){
// par[i] = i;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |