# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49519 | ho94949 | Parachute rings (IOI12_rings) | C++17 | 2620 ms | 120520 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<vector>
#include<algorithm>
using namespace std;
const int MAXN = 1010101;
struct UF
{
int ufd[MAXN], N;
UF(){}
UF(int n): N(n)
{
for(int i=0; i<n; ++i) ufd[i] = i;
}
int Find(int a)
{
if(a==ufd[a]) return a;
return ufd[a] = Find(ufd[a]);
}
bool Union(int a, int b)
{
a = Find(a); b = Find(b);
if(a==b) return false;
ufd[a] = b; return true;
}
};
struct DAT
{
UF uf; int deg[MAXN]; int N; int numcyc; int cyclen; bool ovdeg;
DAT(){}
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... |