# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
774515 | Jarif_Rahman | Split the Attractions (IOI19_split) | C++17 | 97 ms | 27300 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>
#define pb push_back
#define f first
#define sc second
using namespace std;
typedef long long int ll;
typedef string str;
int n, m;
vector<int> s, so;
vector<vector<int>> graph;
vector<vector<int>> dfs_tree;
vector<int> depth, mnd;
vector<bool> visited;
vector<int> sz;
void dfs(int nd, int mom, int d = 0){
visited[nd] = 1;
depth[nd] = d, mnd[nd] = d;
for(int x: graph[nd]) if(x != mom && !visited[x]) dfs(x, nd, d+1), sz[nd]+=sz[x];
for(int x: graph[nd]) if(visited[x]) mnd[nd] = min(mnd[nd], depth[x]);
if(mom != -1) dfs_tree[mom].pb(nd);
}
vector<int> ans;
vector<bool> forbidden;
int cnt;
void create_ans(int nd, int id){
if(cnt == 0) return;
ans[nd] = id;
# | 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... |