This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include "quality.h"
#include <bits/stdc++.h>
using namespace std;
int rectangle(int R, int C, int H, int W, int Q[3001][3001]) {
int ans = R * C;
int mid = H * W / 2;
for (int a = 0; a + H <= R; a++) {
for (int b = 0; b + W <= C; b++) {
vector<int> v;
for (int i = 0; i < H; i++) {
for (int j = 0; j < W; j++) {
v.push_back(Q[a + i][b + j]);
}
}
sort(v.begin(), v.end());
ans = min(ans, v[mid]);
}
}
return ans;
}
# | 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... |