Submission #1161362

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
11613622025-03-04 07:56:37WansurDungeons Game (IOI21_dungeons)C++20
63 / 100
2883 ms543820 KiB
#include <bits/stdc++.h>
#include "dungeons.h"
#define ent '\n'
using namespace std;
typedef long long ll;
const int maxn = 5e4 + 12;
int s[maxn], p[maxn], w[maxn], l[maxn];
ll sum[24][24][maxn], mn[24][24][maxn];
int up[24][24][maxn];
int n;
void init(int N, vector<int> S, vector<int> P, vector<int> W, vector<int> L) {
n = N;
for(int i = 0; i < n; i++) {
s[i] = S[i], p[i] = P[i];
w[i] = W[i], l[i] = L[i];
}
for(int b = 1; b < 24; b++) {
up[b][0][n] = n;
mn[b][0][n] = -1e18;
for(int i = 0; i < n; i++) {
if(s[i] < (1 << b)) {
up[b][0][i] = w[i];
mn[b][0][i] = 1e18;
sum[b][0][i] = s[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...