# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
562478 | CaroLinda | Parachute rings (IOI12_rings) | C++14 | 4062 ms | 80264 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.
/*
SUBTASK 1 JUST TO TEST HIPHOTESES
*/
#include <bits/stdc++.h>
#define all(x) x.begin(),x.end()
#define sz(x) (int)(x.size())
const int MAXN = 1e6+10 ;
using namespace std ;
int N ;
vector<int> adj[MAXN] ;
int disappear(int x){
//if x != -1, then I already removed someone and I can not have cycles/degree 3
//if x == -1, I can have a SINGLE cycle and the answer will be the size of cycle
//in every case, nobody can have degree three
vector<int> dsu(N) ; iota(all(dsu) , 0 ) ;
vector<int> qtd(N,1) ;
vector<int> deg(N,0) ;
int qtdCycle = 0 , sz_cycle = N ;
function<int(int)> find = [&](int a){
return dsu[a] = (a == dsu[a]) ? a : find(dsu[a]) ;
# | 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... |