Submission #1020893

#TimeUsernameProblemLanguageResultExecution timeMemory
1020893MrAndriaMaxcomp (info1cup18_maxcomp)C++14
60 / 100
1053 ms16596 KiB
#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<=m;j1++){ mx=max(mx,a[i][j]-a[i1][j1]-abs(i-i1)-abs(j-j1)-1); } } } } cout<<mx<<endl; }
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...