제출 #253566

#제출 시각아이디문제언어결과실행 시간메모리
253566ErkhemkhuuRectangles (IOI19_rect)C++17
컴파일 에러
0 ms0 KiB
#include <bits/stdc++.h> using namespace std; #define ll long long #define pb push_back #define mp make_pair #define F first #define S second const ll N = 5005; bool valid(ll x1, ll y1, ll x2, ll y2, vector <vector <ll> > &a) { for(ll i = x1; i <= x2; i++) { for(ll j = y1; j <= y2; j++) { if(a[i][j] >= a[x1 - 1][j]) return false; if(a[i][j] >= a[x2 + 1][j]) return false; if(a[i][j] >= a[i][y1 - 1]) return false; if(a[i][j] >= a[i][y2 + 1]) return false; } } return true; } ll count_rectangles(vector <vector <ll> > a) { ll res, i, j, n, m, i1, j1; res = 0; n = a.size(); m = a[0].size(); for(i = 1; i < n - 1; i++) for(j = 1; j < m - 1; j++) for(i1 = i; i1 < n - 1; i1++) for(j1 = j; j1 < m - 1; j1++) res += valid(i, j, i1, j1, a); return res; }

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

/tmp/ccvS8JiY.o: In function `main':
grader.cpp:(.text.startup+0x632): undefined reference to `count_rectangles(std::vector<std::vector<int, std::allocator<int> >, std::allocator<std::vector<int, std::allocator<int> > > >)'
collect2: error: ld returned 1 exit status