# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
468452 | myvaluska | Monthly railway pass (LMIO18_menesinis_bilietas) | C++14 | 1008 ms | 133164 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.
// trenujsprostasarica.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
// ejoiden2.cpp : This file contains the 'main' function. Program execution begins and ends there.
//
#include <iostream>
#include <vector>
#include <algorithm>
#include <set>
using namespace std;
vector<vector<int>>v;
//vector<int>dx = { -1,1,0,0 };
//vector<int>dy = { 0,0,-1,1 };
vector<int>otec;
vector<int>velkost;
int koren(int vr)
{
while (otec[vr] != vr)
{
vr = otec[vr];
}
return vr;
}
void merge(int a, int b)
{
a = koren(a);
b = koren(b);
if (a == b)
{
return;
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... |