# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1087992 | vuavisao | Valley (BOI19_valley) | C++14 | 106 ms | 38996 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;
const int N = (int) 1e5 + 10;
const long long INF = (long long) 1e18;
int n, numStores, q, escape;
tuple<int, int, int> edges[N];
int positionStore[N];
namespace sub12 {
bool check() {
return (1ll * n * q <= (long long) 1e7);
}
vector<vector<pair<int, int>>> g;
long long dist[N];
void solve() {
g.resize(n + 1);
while (q -- > 0) {
for (int u = 1; u <= n; ++ u) {
g[u].clear();
dist[u] = INF;
}
int path, curPosition; cin >> path >> curPosition;
for (int i = 1; i <= n - 1; ++ i) {
if (i == path) continue;
int u = get<0>(edges[i]), v = get<1>(edges[i]), w = get<2>(edges[i]);
g[u].push_back(make_pair(v, 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... |