# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
481659 | SlavicG | 삶의 질 (IOI10_quality) | C++17 | 5075 ms | 2252 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include"quality.h"
#include "bits/stdc++.h"
using namespace std;
#define ll long long
#define forn(i,n) for(int i=0;i<n;i++)
#define all(v) v.begin(), v.end()
#define rall(v) v.rbegin(),v.rend()
#define pb push_back
#define sz(a) (int)a.size()
const int N = 3001;
int rectangle(int n, int m, int a, int b, int c[3001][3001]){
int ans = INT_MAX;
for(int i = 0;i + a - 1 < n;++i){
for(int j = 0;j + b - 1 < m;++j){
int l = 1, r = n * m;
while(l <= r){
int mid = l + r >> 1;
int cnt_smaller = 0, cnt_greater = 0;
for(int x = i;x < i + a;++x){
for(int y = j;y < j + b;++y){
if(c[x][y] < mid)++cnt_smaller;
else if(c[x][y] > mid)++cnt_greater;
}
}
if(cnt_smaller == cnt_greater){
ans = min(ans, mid);
r = mid - 1;
}else if(cnt_smaller > cnt_greater){
r = mid - 1;
}else l = mid + 1;
}
}
}
return ans;
}
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |