(UPD: 2024-12-04 14:48 UTC) Judge is not working due to Cloudflare incident. (URL) We can do nothing about it, sorry. After the incident is resolved, we will grade all submissions.

제출 #1123447

#제출 시각아이디문제언어결과실행 시간메모리
1123447njoop삶의 질 (IOI10_quality)C++20
컴파일 에러
0 ms0 KiB
#include "quality.h" #include <bits/stdc++.h> using namespace std; vector<vector<int>> v; int r, c, h, w; bool check(int val) { vector<vector<int>> n(r+10, vector<int>(c+10, 0)); for(int i=0; i<r; i++) { for(int j=0; j<c; j++) { if(v[i][j] <= val) n[i+1][j+1] = 1; } } for(int i=1; i<=r; i++) { for(int j=1; j<=c; j++) { n[i][j] += n[i-1][j] + n[i][j-1] - n[i-1][j-1]; } } for(int i=h; i<=r; i++) { for(int j=w; j<=c; j++) { if(n[i][j]-n[i-h][j]-n[i][j-w]+n[i-h][j-w] > (h*w)/2) return true; } } return false; } int rectangle(int R, int C, int H, int W, vector<vector<int>> Q) { r = R; c = C; h = H; w = W; v = Q; int lo=1, hi=r*c+1; while(lo < hi) { int mid = (lo+hi)/2; if(check(mid)) { hi = mid; } else { lo = mid+1; } } return lo; }

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

/usr/bin/ld: /tmp/ccsQwUH2.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