結果

問題 No.2261 Coffee
ユーザー sotanishysotanishy
提出日時 2023-04-07 21:12:35
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 564 ms / 2,000 ms
コード長 474 bytes
コンパイル時間 162 ms
コンパイル使用メモリ 82,496 KB
実行使用メモリ 114,560 KB
最終ジャッジ日時 2024-04-10 16:27:12
合計ジャッジ時間 16,236 ms
ジャッジサーバーID
(参考情報)
judge3 / judge1
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 38 ms
52,608 KB
testcase_01 AC 37 ms
52,224 KB
testcase_02 AC 35 ms
52,096 KB
testcase_03 AC 34 ms
52,480 KB
testcase_04 AC 36 ms
52,736 KB
testcase_05 AC 39 ms
59,648 KB
testcase_06 AC 41 ms
60,032 KB
testcase_07 AC 35 ms
52,480 KB
testcase_08 AC 42 ms
60,160 KB
testcase_09 AC 39 ms
59,264 KB
testcase_10 AC 43 ms
62,720 KB
testcase_11 AC 43 ms
62,848 KB
testcase_12 AC 41 ms
61,952 KB
testcase_13 AC 40 ms
61,824 KB
testcase_14 AC 42 ms
62,700 KB
testcase_15 AC 40 ms
61,568 KB
testcase_16 AC 41 ms
61,696 KB
testcase_17 AC 70 ms
77,824 KB
testcase_18 AC 69 ms
77,428 KB
testcase_19 AC 68 ms
77,324 KB
testcase_20 AC 67 ms
77,440 KB
testcase_21 AC 70 ms
77,480 KB
testcase_22 AC 67 ms
77,312 KB
testcase_23 AC 72 ms
78,036 KB
testcase_24 AC 474 ms
111,488 KB
testcase_25 AC 432 ms
106,308 KB
testcase_26 AC 564 ms
113,792 KB
testcase_27 AC 508 ms
110,976 KB
testcase_28 AC 408 ms
108,492 KB
testcase_29 AC 408 ms
106,112 KB
testcase_30 AC 334 ms
100,736 KB
testcase_31 AC 494 ms
114,176 KB
testcase_32 AC 480 ms
114,176 KB
testcase_33 AC 474 ms
114,176 KB
testcase_34 AC 522 ms
114,504 KB
testcase_35 AC 540 ms
114,268 KB
testcase_36 AC 474 ms
114,432 KB
testcase_37 AC 495 ms
114,432 KB
testcase_38 AC 517 ms
114,308 KB
testcase_39 AC 561 ms
114,304 KB
testcase_40 AC 512 ms
114,156 KB
testcase_41 AC 515 ms
114,144 KB
testcase_42 AC 515 ms
114,560 KB
testcase_43 AC 525 ms
114,304 KB
testcase_44 AC 529 ms
114,304 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

import sys
input = sys.stdin.readline

N = int(input())
vals = [[0] * (1 << 5) for _ in range(N)]
minval = [10**18] * (1 << 5)
for i in range(N):
    ps = list(map(int, input().split()))
    for S in range(1 << 5):
        for k in range(5):
            vals[i][S] += (-1)**(S >> k & 1) * ps[k]
        minval[S] = min(minval[S], vals[i][S])
ans = [0]*N
for i in range(N):
    for S in range(1 << 5):
        ans[i] = max(ans[i], vals[i][S]-minval[S])
print(*ans, sep="\n")
0