結果

問題 No.2261 Coffee
ユーザー minimumminimum
提出日時 2023-04-07 21:56:06
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 593 bytes
コンパイル時間 294 ms
コンパイル使用メモリ 82,176 KB
実行使用メモリ 243,476 KB
最終ジャッジ日時 2024-04-10 17:01:45
合計ジャッジ時間 6,936 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 37 ms
57,856 KB
testcase_01 AC 38 ms
59,904 KB
testcase_02 AC 33 ms
52,608 KB
testcase_03 AC 34 ms
52,992 KB
testcase_04 AC 39 ms
59,776 KB
testcase_05 AC 41 ms
61,184 KB
testcase_06 AC 43 ms
62,336 KB
testcase_07 AC 37 ms
59,392 KB
testcase_08 AC 43 ms
62,080 KB
testcase_09 AC 40 ms
61,440 KB
testcase_10 AC 51 ms
66,432 KB
testcase_11 AC 52 ms
67,456 KB
testcase_12 AC 50 ms
65,664 KB
testcase_13 AC 50 ms
65,664 KB
testcase_14 AC 54 ms
66,816 KB
testcase_15 AC 48 ms
64,640 KB
testcase_16 AC 49 ms
65,408 KB
testcase_17 AC 163 ms
77,568 KB
testcase_18 AC 155 ms
77,364 KB
testcase_19 AC 153 ms
77,696 KB
testcase_20 AC 135 ms
77,568 KB
testcase_21 AC 158 ms
77,732 KB
testcase_22 AC 137 ms
77,792 KB
testcase_23 AC 161 ms
78,080 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ls = [list(map(int, input().split())) for _ in range(N)]
ls2 = []
MX = 10 ** 18
for i in range(1 << 5):
    tmp = []
    for j in range(N):
        s = 10 ** 16
        for k in range(5):
            if (i >> k) & 1 == 0:
                s += ls[j][k]
            else:
                s -= ls[j][k]
        tmp.append(s * MX + j)
    tmp.sort()
    ls2.append(tmp[0] % MX)
    ls2.append(tmp[-1] % MX)

for k in range(N):
    ans = 0
    for i in ls2:
        s = 0
        for j in range(5):
            s += abs(ls[k][j] - ls[i][j])
        ans = max(ans, s)
    print(ans)
0