# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1135246 | mmdrzada | Valley (BOI19_valley) | C++20 | 13 ms | 492 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];
int32_t main() {
cin >> n >> s >> q >> e; e--;
REP(i, n-1) {
int a, b, w; cin >> a >> b >> w; a--, b--;
E[i] = {a, b, w};
adj[a].pb({b, w}), adj[b].pb({a, w});
}
# | 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... |