제출 #428567

#제출 시각아이디문제언어결과실행 시간메모리
428567HazemRectangles (IOI19_rect)C++14
컴파일 에러
0 ms0 KiB
#include "rect.h" #include <bits/stdc++.h> #define LL long long using namespace std; const int N = 751; int n,m; int col[N][N][N],row[N][N][N]; long long count_rectangles(std::vector<std::vector<int> > a) { n = a.size(); m = a[0].size(); for(int i=0;i<n;i++) for(int j=0;j<m;j++){ int mx = 0; for(int k=j+1;k<m;k++){ if(k-j>1&&mx<a[i][j]&&mx<a[i][k]) row[j][k][i]++; mx = max(mx,a[i][k]); } } for(int i=0;i<m;i++) for(int j=0;j<n;j++){ int mx = 0; for(int k=j+1;k<n;k++){ if(k-j>1&&mx<a[j][i]&&mx<a[k][i]) col[j][k][i]++; if(i) col[j][k][i] += col[j][k][i-1]; mx = max(mx,a[k][i]); } } LL ans = 0; for(int i=0;i<n;i++) for(int j=0;j<m;j++) for(int k=j+1;k<m;k++){ int q = 1; for(int k1 = i+1;k1<n;k1++){ if(k1-i>1&&k-j>1) ans += q&(col[i][k1][k-1]-col[i][k1][j]==(k-j-1)); q &= row[j][k][k1]; } } return ans; }

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

/usr/lib/gcc/x86_64-linux-gnu/10/libstdc++.a(vterminate.o): in function `__gnu_cxx::__verbose_terminate_handler()':
(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x1e): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZZN9__gnu_cxx27__verbose_terminate_handlerEvE11terminating'
(.text._ZN9__gnu_cxx27__verbose_terminate_handlerEv+0x2b): relocation truncated to fit: R_X86_64_PC32 against `.bss._ZZN9__gnu_cxx27__verbose_terminate_handlerEvE11terminating'
/usr/bin/ld: failed to convert GOTPCREL relocation; relink with --no-relax
collect2: error: ld returned 1 exit status