# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
787640 | alexander707070 | Thousands Islands (IOI22_islands) | C++17 | 40 ms | 23644 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>
#include <variant>
#define MAXN 200007
using namespace std;
int n,m,root,banned;
vector< pair<int,int> > v[MAXN];
vector<int> path,sol,z,ans;
int ind[MAXN];
void euler(int x,int e){
for(int i=ind[x];i<v[x].size();i++){
ind[x]++;
if(v[x][i].first==banned)continue;
euler(v[x][i].first,v[x][i].second);
i=max(i,ind[x]-1);
}
path.push_back(e);
}
int dfs(int x,int p){
if(v[x].size()>2 or (p==0 and v[x].size()>1)){
banned=p; return x;
}
for(int i=0;i<v[x].size();i++){
if(v[x][i].first!=p){
z.push_back(v[x][i].second);
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... |