#include "quality.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
typedef long double ld;
typedef unsigned long long ull;
typedef pair<int,int> pi;
typedef pair<ll,ll> pl;
#define F first
#define S second
#define endl '\n'
#define p(x) cerr<<#x<<" = "<<x<<endl;
#define p2(x,y) cerr<<#x<<" , "<<#y<<" = "<<x<<" , "<<y<<endl;
#define pp(x) cerr<<#x<<" = ("<<x.F<<" , "<<x.S<<")"<<endl;
#define pv(x) cerr<<#x<<" = {";for(auto u : x)cerr<<u<<", ";cerr<<"}"<<endl;
#define fastio ios_base::sync_with_stdio(0);cin.tie(0);cout.tie(0);
#define maxp 22
#define EPS (ld)(1e-18)
#define mod (int)(1e9+7)
#define N (int)(1e5+1)
int rectangle(int n, int m, int h, int w, int arr[3001][3001]) {
int i,j,k,l;
int ans=n*m;
for(i=0;i<n-h+1;i++)
for(j=0;j<m-w+1;j++){
int num[h*w];
int pos=0;
for(k=0;k<h;k++)
for(l=0;l<w;l++)
num[pos++]=arr[i+k][j+l];
sort(num,num+h*w);
ans=min(ans,num[h*w/2]);
}
return ans;
}
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
512 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
512 KB |
Output is correct |
4 |
Correct |
291 ms |
888 KB |
Output is correct |
5 |
Correct |
233 ms |
768 KB |
Output is correct |
6 |
Correct |
170 ms |
768 KB |
Output is correct |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
512 KB |
Output is correct |
4 |
Correct |
291 ms |
888 KB |
Output is correct |
5 |
Correct |
233 ms |
768 KB |
Output is correct |
6 |
Correct |
170 ms |
768 KB |
Output is correct |
7 |
Execution timed out |
5062 ms |
2432 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
512 KB |
Output is correct |
4 |
Correct |
291 ms |
888 KB |
Output is correct |
5 |
Correct |
233 ms |
768 KB |
Output is correct |
6 |
Correct |
170 ms |
768 KB |
Output is correct |
7 |
Execution timed out |
5062 ms |
2432 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |
# |
결과 |
실행 시간 |
메모리 |
Grader output |
1 |
Correct |
7 ms |
384 KB |
Output is correct |
2 |
Correct |
5 ms |
384 KB |
Output is correct |
3 |
Correct |
5 ms |
512 KB |
Output is correct |
4 |
Correct |
291 ms |
888 KB |
Output is correct |
5 |
Correct |
233 ms |
768 KB |
Output is correct |
6 |
Correct |
170 ms |
768 KB |
Output is correct |
7 |
Execution timed out |
5062 ms |
2432 KB |
Time limit exceeded |
8 |
Halted |
0 ms |
0 KB |
- |