제출 #525976

#제출 시각아이디문제언어결과실행 시간메모리
525976tkwiatkowski삶의 질 (IOI10_quality)C++17
컴파일 에러
0 ms0 KiB
/* Zadanie: Autor: Tomasz Kwiatkowski */ #include <bits/stdc++.h> #include "quality.h" #define fi first #define se second #define pb push_back using namespace std; typedef long long ll; const int MAXN = 1e6 + 7; const int INF = 1e9 + 7; bool check(int m, int R, int C, int H, int W, int **Q) { vector<vector<int>> pref(R + 1, vector<int>(C + 1)); for (int i = 1; i <= R; ++i) for (int j = 1; j <= C; ++j) pref[i][j] = pref[i - 1][j] + pref[i][j - 1] - pref[i - 1][j - 1] + (Q[i - 1][j - 1] >= m); for (int i = 1; i <= R-H+1; ++i) for (int j = 1; j <= C-W+1; ++j) if (2*(pref[i + H - 1][j + W - 1] - pref[i - 1][j + W - 1] - pref[i + H - 1][j - 1] + pref[i - 1][j - 1]) >= H*W) return true; return false; } int rectangle(int R, int C, int H, int W, int **Q) { int lo = 1, hi = R*C; while (lo < hi) { int mid = (lo + hi + 1) / 2; if (check(mid, R, C, H, W, Q)) lo = mid; else hi = mid - 1; } return lo; } int main() { ios_base::sync_with_stdio(0), cin.tie(0); return 0; }

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

/usr/bin/ld: /tmp/ccLDXDvo.o: in function `main':
grader.cpp:(.text.startup+0x0): multiple definition of `main'; /tmp/ccDEgBCr.o:quality.cpp:(.text.startup+0x0): first defined here
/usr/bin/ld: /tmp/ccLDXDvo.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