# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
960327 | TAhmed33 | 가장 긴 여행 (IOI23_longesttrip) | C++17 | 740 ms | 1864 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include "longesttrip.h"
#include <bits/stdc++.h>
using namespace std;
vector <int> adj[256], tree[256];
bool vis[256];
struct DSU {
int p[256], sze[256];
void init (int n) {
for (int i = 0; i < n; i++) {
p[i] = i; sze[i] = 1;
}
}
int find (int x) {
return p[x] == x ? x : p[x] = find(p[x]);
}
bool merge (int a, int b) {
a = find(a), b = find(b);
if (a == b) return 0;
if (sze[a] > sze[b]) swap(a, b);
sze[b] += sze[a]; p[a] = b;
return 1;
}
} cur;
vector <int> x;
int p[256];
void dfs (int pos) {
vis[pos] = 1; x.push_back(pos);
for (auto j : adj[pos]) {
if (vis[j]) continue;
tree[pos].push_back(j);
# | 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... |