結果

問題 No.2261 Coffee
ユーザー hir355hir355
提出日時 2023-04-07 21:39:51
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 970 ms / 2,000 ms
コード長 560 bytes
コンパイル時間 335 ms
コンパイル使用メモリ 82,416 KB
実行使用メモリ 210,372 KB
最終ジャッジ日時 2024-04-10 16:47:23
合計ジャッジ時間 23,678 ms
ジャッジサーバーID
(参考情報)
judge1 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
52,628 KB
testcase_01 AC 40 ms
52,536 KB
testcase_02 AC 39 ms
52,520 KB
testcase_03 AC 38 ms
53,612 KB
testcase_04 AC 38 ms
53,488 KB
testcase_05 AC 44 ms
58,864 KB
testcase_06 AC 45 ms
60,520 KB
testcase_07 AC 38 ms
52,352 KB
testcase_08 AC 43 ms
59,520 KB
testcase_09 AC 37 ms
59,520 KB
testcase_10 AC 48 ms
64,768 KB
testcase_11 AC 49 ms
66,400 KB
testcase_12 AC 51 ms
63,488 KB
testcase_13 AC 47 ms
63,232 KB
testcase_14 AC 51 ms
65,312 KB
testcase_15 AC 46 ms
62,620 KB
testcase_16 AC 47 ms
63,232 KB
testcase_17 AC 100 ms
77,440 KB
testcase_18 AC 100 ms
77,356 KB
testcase_19 AC 98 ms
77,696 KB
testcase_20 AC 97 ms
77,060 KB
testcase_21 AC 104 ms
77,408 KB
testcase_22 AC 93 ms
77,192 KB
testcase_23 AC 104 ms
77,284 KB
testcase_24 AC 944 ms
201,148 KB
testcase_25 AC 764 ms
183,144 KB
testcase_26 AC 970 ms
209,216 KB
testcase_27 AC 929 ms
200,136 KB
testcase_28 AC 769 ms
189,668 KB
testcase_29 AC 771 ms
185,716 KB
testcase_30 AC 616 ms
160,960 KB
testcase_31 AC 932 ms
210,012 KB
testcase_32 AC 928 ms
209,884 KB
testcase_33 AC 933 ms
210,132 KB
testcase_34 AC 920 ms
210,140 KB
testcase_35 AC 934 ms
209,880 KB
testcase_36 AC 893 ms
210,012 KB
testcase_37 AC 935 ms
210,136 KB
testcase_38 AC 956 ms
210,248 KB
testcase_39 AC 934 ms
209,996 KB
testcase_40 AC 951 ms
210,372 KB
testcase_41 AC 936 ms
210,204 KB
testcase_42 AC 933 ms
209,980 KB
testcase_43 AC 916 ms
210,112 KB
testcase_44 AC 928 ms
210,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
li = [list(map(int, input().split())) for _ in range(n)]
l = []
for i in range(n):
    t = []
    for j in range(32):
        x = 0
        for k in range(5):
            if (j >> k) & 1:
                x += li[i][k]
            else:
                x -= li[i][k]
        t.append(x)
    l.append(t)
l2 = list(zip(*l))
ma = [0] * 32
mi = [0] * 32
for j in range(32):
    ma[j] = max(l2[j])
    mi[j] = min(l2[j])
for i in range(n):
    ans = 0
    for j in range(32):
        ans = max(ans, ma[j] - l2[j][i], l2[j][i] - mi[j])
    print(ans)
0