結果

問題 No.2261 Coffee
ユーザー rlangevinrlangevin
提出日時 2023-04-07 21:52:20
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 615 bytes
コンパイル時間 237 ms
コンパイル使用メモリ 82,500 KB
実行使用メモリ 108,356 KB
最終ジャッジ日時 2024-04-10 16:59:19
合計ジャッジ時間 30,002 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 34 ms
53,328 KB
testcase_01 AC 32 ms
53,056 KB
testcase_02 AC 31 ms
54,316 KB
testcase_03 AC 32 ms
54,140 KB
testcase_04 AC 33 ms
53,260 KB
testcase_05 AC 32 ms
52,620 KB
testcase_06 AC 34 ms
52,532 KB
testcase_07 AC 33 ms
53,420 KB
testcase_08 AC 32 ms
52,684 KB
testcase_09 AC 32 ms
54,596 KB
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 73 ms
75,612 KB
testcase_16 AC 82 ms
76,148 KB
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])
    for j in range(10):
        L.append(F[min(j, N - 1)][-1])
        L.append(F[max(0, N - 1 - j)][-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