제출 #995950

#제출 시각아이디문제언어결과실행 시간메모리
995950Muaath_5삶의 질 (IOI10_quality)C++17
40 / 100
5017 ms5112 KiB
#include "quality.h" #include <bits/stdc++.h> using namespace std; int rectangle(int R, int C, int H, int W, int Q[3001][3001]) { assert(H*W%2 == 1); int sol = R*C; for (int i = 0; i < R-H+1; i++) { for (int j = 0; j < C-W+1; j++) { vector<int> v; for (int x = i; x < i+H; x++) { for (int y = j; y < j+W; y++) { v.push_back(Q[x][y]); } } assert(int(v.size()) == H*W); sort(v.begin(), v.end()); sol = min(sol, v[H*W/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...