Submission #740001

#TimeUsernameProblemLanguageResultExecution timeMemory
740001fractlpacaQuality Of Living (IOI10_quality)C++17
40 / 100
5033 ms2892 KiB
#include "quality.h" #include <vector> #include <algorithm> #define v vector using namespace std; // Subtask 1: Brute Force int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { int median = R*C; for (int i=0; i<R-H+1; i++) { for (int j=0; j<C-W+1; j++) { v<int> blocks; for (int s=i; s<i+H; s++) { for (int t=j; t<j+W; t++) { blocks.push_back(Q[s][t]); } } sort(blocks.begin(), blocks.end()); median = min(median, blocks[(H*W)/2]); } } return median; } //
#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...