# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1135248 | mmdrzada | Valley (BOI19_valley) | C++20 | 9 ms | 324 KiB |
// Alphine walley
#include <bits/stdc++.h>
using namespace std;
#define int long long
#define vi vector<int>
#define REP(i, k) for(int i = 0 ; i < k ; i ++)
#define pb push_back
#define pii pair<int, int>
#define ll long long
const int N = 1e3+10;
int n, s, q, e;
vector<pii> adj[N];
bool shop[N];
array<int, 3> E[N];
int dis[N], st[N], fn[N];
int timer;
int h[N];
void dfs(int v = 0, int p = -1) {
st[v] = timer++;
h[v] = (p == -1 ? 0 : h[p] + 1);
for(auto [neigh, w]: adj[v]) {
if (neigh != p) {
# | 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... |