Submission #1020875

# Submission time Handle Problem Language Result Execution time Memory
1020875 2024-07-12T10:43:07 Z MrAndria Maxcomp (info1cup18_maxcomp) C++14
0 / 100
1 ms 348 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;
int main(){
    cin>>n>>m;
    for(int i=1;i<=n;i++){
        for(int j=1;j<=m;j++){
            cin>>a[i][j];
        }
    }
    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 0 ms 344 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 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -
# Verdict Execution time Memory Grader output
1 Incorrect 0 ms 344 KB Output isn't correct
2 Halted 0 ms 0 KB -