Submission #619822

# Submission time Handle Problem Language Result Execution time Memory
619822 2022-08-02T16:16:40 Z Icebear16 Quality Of Living (IOI10_quality) C++14
0 / 100
3 ms 436 KB
#include "quality.h"
#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
#define INF 1e18//change to const int INF=1e18 if causing problem
const ll MOD=998244353;
const ll alt=1e10;
const ll inf=1e9+7;//Precalc is not a bad idea
//#define int ll
#define pb push_back
#define pf push_front
#define mp make_pair
#define fi first
#define se second
#define mod(a) (a+inf)%inf
#define all(a) a.begin(),a.end()
#define rall(a) a.rbegin(),a.rend()
#define sz(a) a.size()  

int rectangle(int R, int C, int H, int W, int Q[3001][3001]) {
	int ans=inf;
	for(int i=R-H;i<R;i++){
		for(int j=C-W;j<C;j++){
			vector<int> v;
			v.clear();
			for(int k=(i+1-H);k<=i;k++){
				for(int l=(j+1-W);l<=j;l++){
					v.pb(Q[k][l]);
				}
			}
			sort(all(v));
			int y=sz(v);
			y/=2;
			ans=min(ans,v[y]);
		}
	}
	return ans;
}
//Icebear16
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 436 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 436 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 436 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 436 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 3 ms 436 KB Output isn't correct
2 Halted 0 ms 0 KB -