Submission #995952

#TimeUsernameProblemLanguageResultExecution timeMemory
995952RifalQuality Of Living (IOI10_quality)C++14
40 / 100
5094 ms4860 KiB
#include "quality.h" #include <bits/stdc++.h> const int INF = 1e9 + 4; using namespace std; int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { int sol = INF; for(int i = 0; i < R; i++) { for(int j = 0; j < C; j++) { if(i + H - 1 < R && j + W - 1 < C) { vector<int> v; for(int z = i; z < i+H; z++) { for(int q = j; q < j+W; q++) { v.push_back(Q[z][q]); } } int siz = v.size(); sort(v.begin(),v.end()); sol = min(sol,v[siz/2]); } } } return sol; }
#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...