# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1004704 | MilosMilutinovic | 날다람쥐 (JOI14_ho_t4) | C++14 | 194 ms | 30900 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>
using namespace std;
int main() {
ios::sync_with_stdio(false);
cin.tie(0);
int n, m, x;
cin >> n >> m >> x;
vector<int> h(n);
for (int i = 0; i < n; i++) {
cin >> h[i];
}
vector<vector<pair<int, int>>> g(n);
for (int i = 0; i < m; i++) {
int u, v, w;
cin >> u >> v >> w;
--u; --v;
if (w <= h[u]) {
g[u].emplace_back(v, w);
}
if (w <= h[v]) {
g[v].emplace_back(u, w);
}
}
const long long inf = (long long) 1e18;
vector<vector<long long>> dist(n, vector<long long>(2, inf));
dist[0][1] = 0;
dist[0][0] = x;
vector<int> cur(n);
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |