제출 #1133784

#제출 시각아이디문제언어결과실행 시간메모리
1133784Szymon_Pilipczuk던전 (IOI21_dungeons)C++20
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> #include "dungeons.h" using namespace std; long long j[24][24][400001][3]; long long inf; int n; int s[400001]; int p[400001]; int w[400001]; int l[400001]; int g[10000001]; int k = 24; vector<long long> t; void init(int nt,vector<int> st,vector<int> pt,vector<int> wt,vector<int> lt) { inf = 1e18; n = nt; for(int i =0 ;i<n;i++) { s[i] = st[i]; p[i] = pt[i]; w[i] = wt[i]; l[i] = lt[i]; } s[n] = 0; p[n] = 0; w[n] = n; l[n] = n; for(int i = 0;i<k;i++) { for(int q = 0;q<n;q++) { if(s[q] < (1<<i)) { j[i][0][q][0] = w[q]; j[i][0][q][1] = inf; j[i][0][q][2] = s[q]; } else { j[i][0][q][0] = l[q]; j[i][0][q][1] = s[q]; j[i][0][q][2] = p[q]; } } j[i][0][n][0] = n; j[i][0][n][1] = inf; j[i][0][n][2] = 0; } for(int i = 0;i<k;i++) { for(int w = 0;w<k;w++) { for(int q= 0;q<=n;q++) { j[i][w][q][0] = j[i][w-1][j[i][w-1][q][0]][0]; j[i][w][q][1] = min(j[i][w-1][q][1],j[i][w-1][j[i][w-1][q][0]][1]-j[i][w-1][q][0]); j[i][w][q][2] = j[i][w-1][q][2] + j[i][w-1][j[i][w-1][q][0]][2]; j[i][w][q][2] = j[i][w-1][q][2] + j[i][w-1][j[i][w-1][q][0]][2]; } } } } long long simulate(int x,int zt) { long long z = zt; for(int i = 0;i<k;i++) { for(int w = k-1;w>=0;w--) { if(j[i][w][x][1] > z && j[i][w][x][2]+z < (1<<(i+1))) { z += j[i][w][x][2]; x = j[i][w][x][0]; } } if(z < (1<<(i+1))) { if(z < s[x]) { z+= p[x]; x = l[x]; } else { z+=s[x]; x = w[x]; } } } return z; }

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

/tmp/ccclOQkZ.o: in function `main':
grader.cpp:(.text.startup+0x15e): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x165): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x183): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x18a): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x196): 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+0x1ac): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1b3): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1bf): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1c6): relocation truncated to fit: R_X86_64_PC32 against `.bss'
grader.cpp:(.text.startup+0x1d2): additional relocation overflows omitted from the output
/usr/lib/gcc/x86_64-linux-gnu/11/libstdc++.a(ios_init.o): in function `std::ios_base::Init::Init()':
(.text._ZNSt8ios_base4InitC2Ev+0x1c): failed to convert GOTPCREL relocation against '_ZNSt8ios_base4Init11_S_refcountE'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x1c6): failed to convert GOTPCREL relocation against '_ZSt4cout'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x260): failed to convert GOTPCREL relocation against '_ZSt3cin'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x2e2): failed to convert GOTPCREL relocation against '_ZSt4cerr'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x353): failed to convert GOTPCREL relocation against '_ZSt4clog'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x541): failed to convert GOTPCREL relocation against '_ZSt5wcout'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x5e5): failed to convert GOTPCREL relocation against '_ZSt4wcin'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x670): failed to convert GOTPCREL relocation against '_ZSt5wcerr'; relink with --no-relax
(.text._ZNSt8ios_base4InitC2Ev+0x6e9): failed to convert GOTPCREL relocation against '_ZSt5wclog'; relink with --no-relax
collect2: error: ld returned 1 exit status