# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
882519 | alexdd | Luxury burrow (IZhO13_burrow) | C++17 | 737 ms | 13952 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<bits/stdc++.h>
using namespace std;
int n,m,k;
int mat[1005][1005];
int ult[1005];
int tole[1005];
int aux[1005];
int verif(int lim)
{
int mxm=0;
for(int i=1;i<=m;i++)
ult[i]=0;
for(int i=1;i<=n;i++)
{
deque<int> dq;
for(int j=1;j<=m;j++)
{
if(mat[i][j]<lim)
ult[j] = i;
aux[j] = i - ult[j];
while(!dq.empty() && aux[dq.back()]>=aux[j])
dq.pop_back();
if(dq.empty())
tole[j] = 0;
else
tole[j] = dq.back();
dq.push_back(j);
}
dq.clear();
for(int j=m;j>0;j--)
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |