Submission #824610

#TimeUsernameProblemLanguageResultExecution timeMemory
824610tomrukRectangles (IOI19_rect)C++17
Compilation error
0 ms0 KiB
#include "rect.h" #include <bits/stdc++.h> #define N 705 using namespace std; int dwn[N][N][N]; int rght[N][N][N]; long long count_rectangles(vector<vector<int>> a){ long long ans = 0; int n = a.size(); int m = a[0].size(); for(int i = n-1;i>=0;i--){ for(int j = 0;j<m-1;j++){ int maxi = a[i][j+1]; for(int c = j+2;c<m && maxi < a[i][j];c++){ if(maxi >= a[i][c]) continue; dwn[i][j][c] = 1; dwn[i][j][c] += dwn[i+1][j][c]; maxi = a[i][c]; } } } for(int i = m-1;i>=0;i--){ for(int j = 0;j<n-1;j++){ int maxi = a[j+1][i]; for(int c = j+2;c<n && maxi < a[j][i];c++){ if(maxi >= a[c][i]) continue; rght[j][i][c] = 1; rght[j][i][c] += rght[j][i + 1][c]; maxi = a[c][i]; } } } for(int i = 1;i<n-1;i++){ for(int j = 0;j<m;j++){ for(int c = j+2;c<m;c++){ for(int d = i + 1;d <= i + dwn[i][j][c];d++){ ans += (j + 1 + rght[i-1][j+1][d]) >= c; } } } } return ans; }

Compilation message (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