Submission #1020878

#TimeUsernameProblemLanguageResultExecution timeMemory
1020878MrAndriaMaxcomp (info1cup18_maxcomp)C++14
0 / 100
1 ms600 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; int 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 timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...
#Verdict Execution timeMemoryGrader output
Fetching results...