# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
792627 | irmuun | Saveit (IOI10_saveit) | C++17 | 193 ms | 10228 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>
#include "grader.h"
#include "encoder.h"
using namespace std;
#define ll long long
#define pb push_back
#define ff first
#define ss second
#define all(s) s.begin(),s.end()
struct dsu{
vector<int>p,sz;
dsu(int n){
p.resize(n);
iota(p.begin(),p.end(),0);
sz.resize(n);
fill(sz.begin(),sz.end(),1);
}
int find(ll x){
if(p[x]==x){
return x;
}
return p[x]=find(p[x]);
}
bool same(int x,int y){
x=find(x);
y=find(y);
if(x==y){
Compilation message (stderr)
# | 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... |