# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
572841 | ritul_kr_singh | Stranded Far From Home (BOI22_island) | C++17 | 235 ms | 35528 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;
#define int int64_t
#define sp << ' ' <<
#define nl << '\n'
const int LIM = 2e5;
int N, M, s[LIM], e[LIM];
vector<int> g[LIM], h[LIM];
int find(int u) {
return e[u] < 0 ? u : e[u] = find(e[u]);
}
signed main() {
cin.tie(0)->sync_with_stdio(0);
cin >> N >> M;
array<int, 2> byS[N];
for(int i = 0; i < N; ++i) {
cin >> s[i];
e[i] = -1;
h[i] = {i};
byS[i] = {s[i], i};
}
for(int i = 0; i < M; ++i) {
int u, v; cin >> u >> v;
--u, --v;
# | 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... |