제출 #733270

#제출 시각아이디문제언어결과실행 시간메모리
733270That_Salamander삶의 질 (IOI10_quality)C++17
컴파일 에러
0 ms0 KiB
#include <iostream> #include <algorithm> #include <string> #include <vector> #include <cmath> #include <map> #include <set> #define FOR(var,bound) for(int var = 0; var < bound; var++) #define FORB(var,lb,ub) for (int var = lb; var < ub; var++) #define FORR(var,bound) for(int var = bound-1; var >= 0; var--) using namespace std; typedef long long ll; typedef vector<int> vi; typedef vector<vector<int>> vvi; typedef pair<int, int> pii; int rectangle(int R, int C, int H, int W, vector<vector<int>> Q) { int res = 0; for (int i = 0; i + H <= R; i++) { for (int j = 0; j + W <= C; j++) { vector<int> vals; for (int k = 0; k < H; k++) { for (int l = 0; l < W; l++) { vals.push_back(Q[i + k][j + l]); } } sort(vals.begin(), vals.end()); res = max(res, vals[H * W / 2]); } } return res; } #ifdef LOCAL_TEST signed main() { ios_base::sync_with_stdio(false); cin.tie(NULL); int r, c, h, w; cin >> r >> c >> h >> w; vvi q(r, vi(c)); FOR(i, r) { FOR(j, c) { cin >> q[i][j]; } } cout << rectangle(r, c, h, w, q) << endl; } #endif

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

/usr/bin/ld: /tmp/ccx5zHk6.o: in function `main':
grader.cpp:(.text.startup+0xe9): undefined reference to `rectangle(int, int, int, int, int (*) [3001])'
collect2: error: ld returned 1 exit status