# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
469120 | kevinxiehk | Keys (IOI21_keys) | C++17 | 357 ms | 91488 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 mp make_pair
#define pb emplace_back
#define fi first
#define se second
using namespace std;
set<int> conn[300005];
set<int> conn2[300005];
stack<int> rec;
pair<int, int> val[300005];
bool instack[300005];
int scc[300005];
int sz[300005];
vector<int> component[300005];
int cnt = 0;
int n, m, t, tt, k = 1;
void dfs(int now) {
val[now] = mp(k, k);
k++;
rec.push(now);
instack[now] = true;
for(auto x: conn[now]) {
if(val[x].fi == 0) {
dfs(x);
}
if(instack[x]) {
val[now].se = min(val[now].se, val[x].se);
}
}
if(val[now].se == val[now].fi) {
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... |