# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
755629 | AngusRitossa | Rail (IOI14_rail) | C++14 | 328 ms | 262144 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 "rail.h"
#include <bits/stdc++.h>
using namespace std;
vector<int> adj[5010];
struct UF
{
int rep[5010];
UF()
{
for (int i = 0; i < 5010; i++) rep[i] = i;
}
int findrep(int a)
{
if (rep[a] == a) return a;
return rep[a] = findrep(rep[a]);
}
void merge(int a, int b)
{
rep[findrep(a)] = findrep(b);
}
};
UF uf;
int ty[5010];
int seen[5010];
int loc[5010];
int dis[5010][5010];
void dfs(int a, int d, int type = 0)
{
if (seen[a]) return;
seen[a] = 1;
# | 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... |