# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
635515 | Bruteforceman | Parachute rings (IOI12_rings) | C++11 | 658 ms | 42344 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.
#pragma GCC optimize("Ofast")
#include "bits/stdc++.h"
using namespace std;
int N;
struct dsu {
int other[1000010];
int len[1000010];
int cycle_cnt;
int cycle_sum;
bool bad;
int no_of_nodes;
int del_node;
void init (int n) {
no_of_nodes = n;
del_node = -1;
for(int i = 0; i < no_of_nodes; i++) {
other[i] = i;
len[i] = 1;
}
cycle_cnt = 0;
cycle_sum = 0;
bad = false;
}
void add(int x, int y) {
if(del_node == x || del_node == y) return ;
if(bad) return ;
if(other[x] == y) {
other[x] = -1;
other[y] = -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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |