# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1067429 | Itamar | Dungeons Game (IOI21_dungeons) | C++17 | 1461 ms | 18140 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 <vector>
using namespace std;
#define vi vector<int>
#define ll long long
vi S,P,W,L;
int N;
const int siz = 5e4+2;
#include<iostream>
// tos + Z >= S[i]
// assuming 2^k <= Z < 2^(k+1) in all jumps
ll dp[siz][30][30]; // minumum of S[i]-tos
ll tos[siz][30][30];
int wer[siz][30][30];
void init(int n, std::vector<int> s, std::vector<int> p, std::vector<int> w, std::vector<int> l) {
S=s,P=p,W=w,L=l,N=n;
for(int k = 0; k < 30; k++){
for(int i = 0; i < n; i++){
if(S[i] > (1<<k)){
wer[i][0][k] = l[i];
tos[i][0][k] = p[i];
dp[i][0][k] = S[i];
}else{
wer[i][0][k] = w[i];
tos[i][0][k] = S[i];
dp[i][0][k] = 1e18;
}
}
for(int j = 1; j < 30; j++){
for(int i = 0; i < n; i++){
# | 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... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |