# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
5398 | gs12117 | 호화 벙커 (IZhO13_burrow) | C++98 | 648 ms | 5088 KiB |
This submission is migrated from previous version of oj.uz, which used different machine for grading. This submission may have different result if resubmitted.
#include<stdio.h>
int n,m,p;
int a[1010][1010];
int b[1010];
int stk[1010];
int sp;
int lend[1010];
int rend[1010];
int f(int x){
int i,j,ans;
for(i=0;i<m;i++){
b[i]=0;
}
ans=0;
for(i=0;i<n;i++){
for(j=0;j<m;j++){
if(a[i][j]>=x){
b[j]++;
}
else b[j]=0;
}
stk[0]=-1;
sp=1;
for(j=0;j<m;j++){
while(sp!=1&&b[stk[sp-1]]>=b[j])sp--;
lend[j]=stk[sp-1];
stk[sp]=j;
sp++;
}
stk[0]=m;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |