# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
49004 | Namnamseo | Parachute rings (IOI12_rings) | C++17 | 832 ms | 50460 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 <bits/stdc++.h>
using namespace std;
typedef pair<int,int> pp;
vector<pp> links;
int n;
struct simulator {
int deg [1000010];
int oppo[1000010];
bool crit;
int R;
void init(int rem){
R=rem;
for(int i=0; i<n; ++i) deg[i]=0, oppo[i]=i;
crit=true;
for(auto& q:links){
update(q.first, q.second);
}
}
void update(int a,int b){
if(!crit) return;
if(a!=R && b!=R){
++deg[a], ++deg[b];
int p=oppo[a], q=oppo[b];
if(b==p){
crit=false;
# | 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... |