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]) {
assert(H*W%2 == 1);
int sol = R*C;
for (int i = 0; i < R-H+1; i++) {
for (int j = 0; j < C-W+1; j++) {
vector<int> v;
for (int x = i; x < i+H; x++) {
for (int y = j; y < j+W; y++) {
v.push_back(Q[x][y]);
}
}
assert(int(v.size()) == H*W);
sort(v.begin(), v.end());
sol = min(sol, v[H*W/2]);
}
}
return sol;
}
# | 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... |