Submission #243613

#TimeUsernameProblemLanguageResultExecution timeMemory
243613ctziapoQuality Of Living (IOI10_quality)C++14
40 / 100
5083 ms2916 KiB
#include <stdio.h> #include <stdlib.h> #include "quality.h" #include <vector> #include <algorithm> #include <iostream> using namespace std; int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { int n=R; int m=C; int h=H; int w=W; int ans=n*m; // cout<<endl; for(int i=0;i<=n-h;i++){ for(int j=0;j<=m-w;j++){ vector < int > v; for(int k=i;k<i+h;k++){ for(int f=j;f<j+w;f++){ v.push_back(Q[k][f]); // cout<<Q[k][f]<<" "; } // cout<<endl; } sort(v.begin(),v.end()); //cout<<endl; ans=min(ans,v[(h*w)/2]); } } return ans; }
#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...