# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
547972 | Jarif_Rahman | Love Polygon (BOI18_polygon) | C++17 | 199 ms | 30036 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;
vector<vector<int>> v;
vector<int> succ;
vector<bool> bl;
pair<int, int> cycle;
bool cycle_type;
void dfs_cycle(int nd, int ss){
if(bl[nd]){
cycle = {ss, nd};
return;
}
bl[nd] = 1;
unordered_map<int, int> mp;
for(int x: v[nd]) if(x != ss) dfs_cycle(x, nd), mp[x]++;
for(auto [x, c]: mp) if(c > 1){
cycle = {nd, x};
if(nd != x) cycle_type = 1;
}
}
# | 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... |