Submission #595772

#TimeUsernameProblemLanguageResultExecution timeMemory
595772promaQuality Of Living (IOI10_quality)C++17
40 / 100
5035 ms2388 KiB
#include "quality.h" #include <vector> #include <algorithm> int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { int mn = 1e9; for (int i = 0; i <= R - H; i ++) { for (int j = 0; j <= C - W; j ++) { std::vector <int> v(H*W); int pos = 0; for (int x = i; x < i + H; x ++) { for (int y = j; y < j + W; y ++) { v[pos ++] = Q[x][y]; } } std::sort(v.begin(), v.end()); mn = std::min(mn, v[H*W/2]); } } 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...