Submission #1087992

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10879922024-09-13 16:30:58vuavisaoValley (BOI19_valley)C++14
100 / 100
106 ms38996 KiB
#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));
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...