Submission #1020882

# Submission time Handle Problem Language Result Execution time Memory
1020882 2024-07-12T10:48:26 Z MrAndria Maxcomp (info1cup18_maxcomp) C++17
0 / 100
1 ms 600 KB
#include <bits/stdc++.h>
using namespace std;
#define ff first;
#define ss second
#define pb push_back
#define int long long
int n,m,a[1005][1005],mx;
signed main(){
    cin>>n>>m;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            cin>>a[i][j];
        }
    }
    mx=-INT_MAX;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            for(int i1=1;i1<=n;i1++){
                for(int j1=1;j1<=n;j1++){
                    mx=max(mx,a[i][j]-a[i1][j1]-abs(i-i1)-abs(j-j1)-1);
                }
            }
        }
    }
    cout<<mx<<endl;
}
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 348 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 1 ms 600 KB Output isn't correct
2 Halted 0 ms 0 KB -