제출 #891444

#제출 시각아이디문제언어결과실행 시간메모리
891444Sir_Ahmed_ImranSplit the Attractions (IOI19_split)C++17
컴파일 에러
0 ms0 KiB
///~~~LOTA~~~/// #include <bits/stdc++.h> using namespace std; #define nl '\n' #define ff first #define ss second #define ll long long #define append push_back #define pii pair<int,int> #define all(x) (x).begin(),(x).end() #define N 2500 int l[N][N]; int u[N][N]; int r[N][N]; int d[N][N]; ll count_rectangles(vector<vector<int>> a){ int n,m; n=a.size(); m=a[0].size(); for(int i=1;i<n-1;i++){ for(int j=1;j<m-1;j++){ l[i][j]=l[i-1][j]+(a[i][j]<a[i][j-1]); u[i][j]=u[i][j-1]+(a[i][j]<a[i-1][j]); r[i][j]=r[i-1][j]+(a[i][j]<a[i][j+1]); d[i][j]=d[i][j-1]+(a[i][j]<a[i+1][j]); } } ll o=0; for(int i1=1;i1<n-1;i1++){ for(int j1=1;j1<m-1;j1++){ for(int i2=i1;i2<n-1;i2++){ for(int j2=j1;j2<m-1;j2++){ if(l[i2][j1]-l[i1-1][j1]==i2-i1+1 && u[i1][j2]-u[i1][j1-1]==j2-j1+1 && r[i2][j2]-r[i1-1][j2]==i2-i1+1 && d[i2][j2]-d[i2][j1-1]==j2-j1+1){ o++; } } } } } return o; }

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

/usr/bin/ld: /tmp/ccj82zLE.o: in function `main':
grader.cpp:(.text.startup+0x266): undefined reference to `find_split(int, int, int, int, std::vector<int, std::allocator<int> >, std::vector<int, std::allocator<int> >)'
collect2: error: ld returned 1 exit status