# | TimeUTC-0 | Username | Problem | Language | Result | Execution time | Memory |
---|---|---|---|---|---|---|---|
1161989 | PieArmy | Bomb (IZhO17_bomb) | C++20 | 304 ms | 74596 KiB |
#include <bits/stdc++.h>
typedef long long ll;
using namespace std;
int n,m;
int table[2523][2523],ust[2523][2523],alt[2523][2523],mx;
int mn[2523];
int ans=0;
void cal(){
for(int i=1;i<=n;i++){
for(int j=1;j<=m;j++){
if(table[i][j]!=0&&table[i][j-1]==0){
int a=ust[i][j],b=alt[i][j];
for(int l=j;l<=m;l++){
if(table[i][l]==0)break;
a=max(a,ust[i][l]);
b=min(b,alt[i][l]);
mn[l-j+1]=min(mn[l-j+1],b-a+1);
}
}
}
}
}
int main(){
ios_base::sync_with_stdio(false);cin.tie(NULL);
cin>>n>>m;
for(int &x:mn)
x=n;
# | Verdict | Execution time | Memory | Grader output |
---|---|---|---|---|
Fetching results... |