제출 #1050818

#제출 시각UTC-0아이디문제언어결과실행 시간메모리
10508182024-08-09 14:51:03Blagoj던전 (IOI21_dungeons)C++17
89 / 100
7122 ms1787224 KiB
#include <bits/stdc++.h>
#include "dungeons.h"
using namespace std;
#define ll long long
#define inf 1e12
const int mxn = 4e5 + 10, LOG1 = 25, LOG2 = 9, BASE = 8;
// steps, pwr
int n;
vector<int> s, p, w, l;
int go[mxn][LOG1][LOG2];
ll gain[mxn][LOG1][LOG2], lim[mxn][LOG1][LOG2];
ll F[LOG2];
void init(int _n, vector<int> _s, vector<int> _p, vector<int> _w, vector<int> _l) {
F[0] = 1;
for (int i = 1; i < LOG2; i++) F[i] = F[i - 1] * BASE;
n = _n, s = _s, p = _p, w = _w, l = _l;
for (int pwr = 0; pwr < LOG2; pwr++) {
for (int i = 0; i < n; i++) {
if (F[pwr] >= s[i]) {
if (w[i] == n) go[i][0][pwr] = -1;
else {
go[i][0][pwr] = w[i];
gain[i][0][pwr] = s[i];
lim[i][0][pwr] = inf;
}
}
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
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...