# | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
---|---|---|---|---|---|---|---|
76556 | 2018-09-14T18:27:19 Z | Vardanyan | Maxcomp (info1cup18_maxcomp) | C++14 | 4 ms | 748 KB |
#include <bits/stdc++.h> using namespace std; const int N = 1005; int a[N][N]; int main(){ int ans = -1; int n,m; scanf("%d%d",&n,&m); for(int i = 1;i<=n;i++){ for(int j = 1;j<=m;j++){ scanf("%d",&a[i][j]); } } for(int i = 1;i<=n;i++){ for(int j = 1;j<=m;j++){ for(int ii = i;ii<=n;ii++){ for(int jj = j;jj<=m;jj++){ int d = (ii-i)+(jj-j)+1; int x = abs(a[i][j]-a[ii][jj]); x-=d; ans = max(ans,x); } } } } cout<<ans<<endl; return 0; }
Compilation message
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 372 KB | Output is correct |
3 | Correct | 2 ms | 448 KB | Output is correct |
4 | Correct | 2 ms | 468 KB | Output is correct |
5 | Correct | 2 ms | 544 KB | Output is correct |
6 | Incorrect | 2 ms | 560 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 560 KB | Output is correct |
2 | Correct | 4 ms | 616 KB | Output is correct |
3 | Correct | 3 ms | 748 KB | Output is correct |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 372 KB | Output is correct |
3 | Correct | 2 ms | 448 KB | Output is correct |
4 | Correct | 2 ms | 468 KB | Output is correct |
5 | Correct | 2 ms | 544 KB | Output is correct |
6 | Incorrect | 2 ms | 560 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |
# | 결과 | 실행 시간 | 메모리 | Grader output |
---|---|---|---|---|
1 | Correct | 3 ms | 256 KB | Output is correct |
2 | Correct | 2 ms | 372 KB | Output is correct |
3 | Correct | 2 ms | 448 KB | Output is correct |
4 | Correct | 2 ms | 468 KB | Output is correct |
5 | Correct | 2 ms | 544 KB | Output is correct |
6 | Incorrect | 2 ms | 560 KB | Output isn't correct |
7 | Halted | 0 ms | 0 KB | - |