제출 #960779

#제출 시각아이디문제언어결과실행 시간메모리
960779Warinchai던전 (IOI21_dungeons)C++17
컴파일 에러
0 ms0 KiB
#include "dungeons.h" #include<bits/stdc++.h> using namespace std; int lift[26][20][400005]; long long mn[26][20][400005]; long long dis[26][20][400005]; long long inf=1e18+7; int N; vector<int>W; vector<int>S; void init(int n,vector<int> s,vector<int> p,vector<int> w,vector<int> l) { N=n; S=s; W=w; for(int i=1;i<=25;i++){ int st=(1<<(i-1)); int en=(1<<i)-1; for(int j=0;j<n;j++){ if(s[j]>en)lift[i][0][j]=l[j],mn[i][0][j]=inf,dis[i][0][j]=p[j]; else if(s[j]>=st)lift[i][0][j]=l[j],mn[i][0][j]=s[j],dis[i][0][j]=p[j]; else lift[i][0][j]=w[j],mn[i][0][j]=inf,dis[i][0][j]=s[j]; } lift[i][0][n]=n; mn[i][0][n]=0; for(int j=1;j<=19;j++){ for(int k=0;k<n;k++){ lift[i][j][k]=lift[i][j-1][lift[i][j-1][k]]; dis[i][j][k]=dis[i][j-1][k]+dis[i][j-1][lift[i][j-1][k]]; mn[i][j][k]=min(mn[i][j-1][k],mn[i][j-1][lift[i][j-1][k]]-dis[i][j-1][k]); } } } return; } long long simulate(int x, int z) { int c=1,lv=0; long long pow=z; while(x<(1<<c)){ lv=c; c++; } while(1){ for(int i=25;i>=0;i--){ if(pow<mn[lv][i][x])pow+=dis[lv][i][x],x=lift[lv][i][x]; } if(x==N)break; pow+=S[x]; x=W[x]; lv++; } return pow; }

컴파일 시 표준 에러 (stderr) 메시지

/tmp/ccKx2cfW.o: in function `main':
grader.cpp:(.text.startup+0x178): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x17f): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x19d): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1a4): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1b0): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1b7): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1c3): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1ca): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1d6): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1dd): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1e9): additional relocation overflows omitted from the output
/usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
collect2: error: ld returned 1 exit status