Submission #1067429

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10674292024-08-20 16:54:32ItamarDungeons Game (IOI21_dungeons)C++17
0 / 100
1461 ms18140 KiB
#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++){
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...