Submission #587325

#TimeUsernameProblemLanguageResultExecution timeMemory
587325HeyYouNotYouYouQuality Of Living (IOI10_quality)C++14
40 / 100
5086 ms2648 KiB
#include "quality.h" //#include "grader.cpp" #include <bits/stdc++.h> using namespace std; int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { int median = (H*W)/2; int mn=INT_MAX; for(int i = 0 ; i <= R-H ; i ++) { for(int j = 0; j <= C-W ; j ++) { vector<int>ans; for(int p = i ; p <= i+H-1 ; p ++){ for(int k = j ; k <= j+W-1 ; k ++) { ans.push_back(Q[p][k]); } } sort(ans.begin(),ans.end()); mn=min(mn,ans[median]); } } // cout<<mn<<endl; return mn; }
#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...