# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
931672 | Yazan_Alattar | Stone Arranging 2 (JOI23_ho_t1) | C++14 | 111 ms | 21752 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;
typedef long long ll;
typedef unsigned long long ull;
#define F first
#define S second
#define pb push_back
#define endl "\n"
#define all(x) x.begin(), x.end()
const int M = 500007;
const ll inf = 1e9;
const ll INF = 1e12;
const ll mod = 1e9 + 7;
const double eps = 1e-6;
map <int,int> last;
int n, p[M], sz[M], col[M], Right[M], Prev[M];
int root(int x){
while(p[x] != x){
p[x] = p[p[x]];
x = p[x];
}
return x;
}
void connect(int x, int y){
x = root(x); y = root(y);
if(x == y) return;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |