# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
920877 | itslq | Monthly railway pass (LMIO18_menesinis_bilietas) | C++17 | 566 ms | 159824 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 <unordered_map>
#include <unordered_set>
using namespace std;
vector<int> pa, rk;
int getParent(int n) {
if (pa[n] == n) return n;
return pa[n] = getParent(pa[n]);
}
void mge(int x, int y) {
if (x == y) return;
if (rk[x] > rk[y]) {
pa[y] = x;
} else if (rk[x] == rk[y]) {
pa[y] = x;
rk[x]++;
} else {
pa[x] = y;
}
}
int main() {
ios_base::sync_with_stdio(0);
cin.tie(0);
cout.tie(0);
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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |