# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
765325 | vjudge1 | Roadside Advertisements (NOI17_roadsideadverts) | C++17 | 46 ms | 15508 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>
// #pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
// #pragma GCC optimize("Ofast,unroll-loops,fast-math,O3")
#define ent '\n'
#define f first
#define s second
using namespace std;
typedef long long ll;
typedef pair < int, int> pii;
typedef pair < ll, ll > pll;
const int maxn = 2e5 + 100;
const int mod = 1e9 + 7;
const int INF = 1e9;
const int LOG = 20;
const int K = 400;
const int P = 31;
int n, m;
vector < pii > g[maxn];
int pref[maxn], p[LOG][maxn], tin[maxn], tout[maxn], timer, depth[maxn], a[6];
ll ans = 0;
void dfs(int v){
for(int i = 1;i < LOG;i++){
p[i][v] = p[i - 1][p[i - 1][v]];
}
tin[v] = ++timer;
for(auto to: g[v]){
if(to.f == p[0][v])continue;
# | 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... |