제출 #1233088

#제출 시각아이디문제언어결과실행 시간메모리
1233088santi3223Quality Of Living (IOI10_quality)C++20
40 / 100
5088 ms2456 KiB
#include <bits/stdc++.h> #include "quality.h" using namespace std; #define ll long long #define vb vector<bool> #define pb push_back #define ff(aa, bb, cc) for(ll aa = bb; aa < cc; aa++) #define vl vector<ll> #define pll pair<ll, ll> #define fi first #define se second #define ed "\n" #define all(aaa) aaa.begin(), aaa.end() #define rall(aaa) aaa.rbegin(), aaa.rend() ll MOD = 1e9+7; int rectangle(int r, int c, int h, int w, int Q[3001][3001]){ //vector<vector<set<ll>>> calc(r-h+1, vector<set<ll>>(c-w+1)); //vector<vl> erasi(r-h+1); //vector<vector<vl>> erasj(r-h+1, vector<vl>(c-w+1)); ll minn = c*r; ll mid = (h*w)/2; ff(i, 0, r-h+1){ ff(j, 0, c-w+1){ vl cur; ff(curi, i, i+h){ ff(curj, j, j+w){ cur.pb(Q[curi][curj]); } } ff(curi, 0, cur.size()){ //cout << cur[curi] << " "; } sort(all(cur)); //cout << ed; //cout << cur[mid] << ed; minn = min(minn, cur[mid]); } } return minn; } /* static int R,C,H,W,Q[3001][3001],i,j,ans; int main(){ scanf("%d%d%d%d",&R,&C,&H,&W); for (i=0;i<R;i++) for (j=0;j<C;j++) scanf("%d",&Q[i][j]); ans = rectangle(R,C,H,W,Q); printf("%d\n",ans); return 0; } */
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...