| # | 제출 시각 | 아이디 | 문제 | 언어 | 결과 | 실행 시간 | 메모리 |
|---|---|---|---|---|---|---|---|
| 84082 | alextodoran | Maxcomp (info1cup18_maxcomp) | C++14 | 1073 ms | 13388 KiB |
이 제출은 이전 버전의 oj.uz에서 채점하였습니다. 현재는 제출 당시와는 다른 서버에서 채점을 하기 때문에, 다시 제출하면 결과가 달라질 수도 있습니다.
#include <bits/stdc++.h>
#define NM 1002
using namespace std;
int n, m;
int ma[NM][NM];
int mx = -1;
int dist(int a1, int a2, int b1, int b2)
{
return abs(a1 - b1) + 1 + abs(a2 - b2) + 1 - 1;
}
int main()
{
cin >> n >> m;
for(int i = 1; i <= n; i++)
for(int j = 1; j <= m; j++)
cin >> ma[i][j];
for(int i1 = 1; i1 <= n; i1++)
for(int j1 = 1; j1 <= m; j1++)
for(int i2 = 1; i2 <= n; i2++)
for(int j2 = 1; j2 <= m; j2++)
if(abs(ma[i1][j1] - ma[i2][j2]) - dist(i1, j1, i2, j2) > mx)
mx = abs(ma[i1][j1] - ma[i2][j2]) - dist(i1, j1, i2, j2);
cout << mx << "\n";
return 0;
}
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
| # | Verdict | Execution time | Memory | Grader output |
|---|---|---|---|---|
| Fetching results... | ||||
