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>
const int INF = 1e9 + 4;
using namespace std;
int rectangle(int R, int C, int H, int W, int Q[3001][3001]) {
int sol = INF;
for(int i = 0; i < R; i++) {
for(int j = 0; j < C; j++) {
if(i + H - 1 < R && j + W - 1 < C) {
vector<int> v;
for(int z = i; z < i+H; z++) {
for(int q = j; q < j+W; q++) {
v.push_back(Q[z][q]);
}
}
int siz = v.size();
sort(v.begin(),v.end());
sol = min(sol,v[siz/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... |