Submission #1056386

#TimeUTC-0UsernameProblemLanguageResultExecution timeMemory
10563862024-08-13 09:09:04Huseyn123Dungeons Game (IOI21_dungeons)C++17
0 / 100
86 ms311256 KiB
#include <bits/stdc++.h>
#include "dungeons.h"
#pragma GCC optimize("O3,unroll-loops")
#pragma GCC target("avx,avx2,bmi,bmi2,lzcnt,popcnt")
#define INF LLONG_MAX
using namespace std;
typedef long long ll;
const int lgb=8;
const int lg=6;
ll st0[lg][25][400001];
ll st1[lg][25][400001];
int st2[lg][25][400001];
vector<int> S,P,W,L;
int N;
void init(int n, vector<int> s, vector<int> p, vector<int> w, vector<int> l) {
s.push_back(0);
N=n;
S=s;
P=p;
W=w;
L=l;
for(int i=0;i<25;i++){
for(int z=0;z<n;z++){
if(s[z]<(1<<i)){
st0[i][0][z]=s[z];
if(w[z]!=n && s[w[z]]<(1<<i)){
st1[i][0][z]=-INF;
}
else{
st1[i][0][z]=s[z]-s[w[z]];
 
הההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההההה
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Compilation message (stderr)

dungeons.cpp: In function 'void init(int, std::vector<int>, std::vector<int>, std::vector<int>, std::vector<int>)':
dungeons.cpp:45:15: warning: iteration 6 invokes undefined behavior [-Waggressive-loop-optimizations]
   45 |   st0[i][0][n]=0;
      |   ~~~~~~~~~~~~^~
dungeons.cpp:22:15: note: within this loop
   22 |  for(int i=0;i<25;i++){
      |              ~^~~
#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...