# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
492392 | socpite | Evacuation plan (IZhO18_plan) | C++14 | 529 ms | 43028 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;
#define f first
#define s second
const int maxn = 100001;
const int oo = 1e9;
const int mx2 = 18;
int st[2][mx2][maxn];
int n, m, k, q;
void build(int x){
if(x == mx2)return;
for(int i = 1; i <= n; i++){
if(st[0][x-1][i] != -1){
st[0][x][i] = st[0][x-1][st[0][x-1][i]];
st[1][x][i] = min(st[1][x-1][i], st[1][x-1][st[0][x-1][i]]);
}
else{
st[0][x][i]=-1;
st[1][x][i]=oo;
}
}
build(x+1);
}
vector<int> up;
vector<vector<pair<int, int>>> graph;
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |