# | 제출 시각UTC-0 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
204146 | Kalam | 호화 벙커 (IZhO13_burrow) | C++11 | 587 ms | 18568 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
// KALAM
# include<bits/stdc++.h>
using namespace std;
const int N = 1000 + 77;
int n , m , k , a[N][N] , b[N][N] , c[N] , L[N] , R[N];
inline int Solve() {
int res = 0;
for(int i = 1;i <= m;++ i) {
L[i] = i - 1;
while(c[L[i]] >= c[i] && L[i] > 0)
L[i] = L[L[i]];
}
for(int i = m;i > 0;-- i) {
R[i] = i + 1;
while(c[R[i]] >= c[i] && R[i] <= m)
R[i] = R[R[i]];
res = max(res , (R[i] - L[i] - 1) * c[i]);
}
return res;
}
inline int Check(int t) {
int res = 0;
for(int i = 1;i <= n;++ i) {
for(int j = 1;j <= m;++ j)
b[i][j] = (a[i][j] >= t ? 1 + b[i - 1][j] : 0);
for(int j = 1;j <= m;++ j)
c[j] = b[i][j];
res = max(res , Solve());
컴파일 시 표준 에러 (stderr) 메시지
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |