結果

問題 No.2261 Coffee
ユーザー rlangevinrlangevin
提出日時 2023-04-07 21:48:29
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 556 bytes
コンパイル時間 298 ms
コンパイル使用メモリ 82,456 KB
実行使用メモリ 106,980 KB
最終ジャッジ日時 2024-04-10 16:54:59
合計ジャッジ時間 18,171 ms
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 31 ms
52,452 KB
testcase_01 AC 32 ms
54,508 KB
testcase_02 AC 31 ms
53,936 KB
testcase_03 AC 31 ms
52,808 KB
testcase_04 AC 31 ms
52,532 KB
testcase_05 WA -
testcase_06 AC 31 ms
52,880 KB
testcase_07 AC 31 ms
52,528 KB
testcase_08 AC 31 ms
53,196 KB
testcase_09 AC 31 ms
53,136 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 WA -
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 WA -
testcase_31 WA -
testcase_32 WA -
testcase_33 WA -
testcase_34 WA -
testcase_35 WA -
testcase_36 WA -
testcase_37 WA -
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
readline = sys.stdin.readline

N = int(readline())
A, B, C, D, E = [0] * N, [0] * N, [0] * N, [0] * N, [0] * N
F = []
for i in range(N):
    A[i], B[i], C[i], D[i], E[i] = map(int, readline().split())
    F.append((A[i], B[i], C[i], D[i], E[i], i))
    
L = []
for i in range(5):
    F.sort(key=lambda x : x[i])
    L.append(F[0][-1])
    L.append(F[-1][-1])
    
for i in range(N):
    ans = 0
    for a in L:
        ans = max(ans, abs(A[i] - A[a]) + abs(B[i] - B[a]) + abs(C[i] - C[a]) + abs(D[i] - D[a]) + + abs(E[i] - E[a]))
    print(ans)
0