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 <bits/stdc++.h>
#define forn(i, a, b) for(int i = int(a); i <= int(b); ++ i)
///#include "grader.h"
#include "quality.h"
using namespace std;
vector<int> arre;
int rectangle(int R, int C, int H, int W, int Q[3001][3001]) {
int mitad = (H * W) / 2;
int res = INT_MAX;
forn(i, 0, R - H){
forn(j, 0, C - W){
arre.clear();
forn(k, i, i + H - 1){
forn(l, j, j + W - 1){
arre.push_back(Q[k][l]);
}
}
sort(arre.begin(), arre.end());
res = min(res, arre[mitad]);
}
}
return res;
}
# | 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... |