結果

問題 No.2261 Coffee
ユーザー ntudantuda
提出日時 2023-04-08 09:53:39
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 596 ms / 2,000 ms
コード長 548 bytes
コンパイル時間 388 ms
コンパイル使用メモリ 82,464 KB
実行使用メモリ 123,392 KB
最終ジャッジ日時 2024-04-14 08:43:04
合計ジャッジ時間 17,453 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,668 KB
testcase_01 AC 37 ms
52,696 KB
testcase_02 AC 36 ms
52,936 KB
testcase_03 AC 37 ms
52,436 KB
testcase_04 AC 37 ms
53,164 KB
testcase_05 AC 41 ms
59,268 KB
testcase_06 AC 42 ms
60,824 KB
testcase_07 AC 37 ms
53,148 KB
testcase_08 AC 44 ms
61,128 KB
testcase_09 AC 43 ms
60,800 KB
testcase_10 AC 51 ms
63,712 KB
testcase_11 AC 53 ms
65,052 KB
testcase_12 AC 49 ms
63,676 KB
testcase_13 AC 47 ms
63,876 KB
testcase_14 AC 50 ms
64,220 KB
testcase_15 AC 46 ms
62,360 KB
testcase_16 AC 48 ms
62,492 KB
testcase_17 AC 96 ms
77,848 KB
testcase_18 AC 95 ms
77,984 KB
testcase_19 AC 96 ms
77,964 KB
testcase_20 AC 93 ms
77,672 KB
testcase_21 AC 96 ms
77,996 KB
testcase_22 AC 93 ms
77,736 KB
testcase_23 AC 96 ms
78,100 KB
testcase_24 AC 508 ms
119,760 KB
testcase_25 AC 463 ms
113,516 KB
testcase_26 AC 584 ms
122,728 KB
testcase_27 AC 548 ms
119,168 KB
testcase_28 AC 438 ms
115,252 KB
testcase_29 AC 427 ms
115,144 KB
testcase_30 AC 363 ms
106,460 KB
testcase_31 AC 531 ms
123,392 KB
testcase_32 AC 501 ms
122,968 KB
testcase_33 AC 504 ms
122,992 KB
testcase_34 AC 510 ms
123,120 KB
testcase_35 AC 574 ms
122,904 KB
testcase_36 AC 515 ms
123,044 KB
testcase_37 AC 524 ms
123,156 KB
testcase_38 AC 561 ms
122,920 KB
testcase_39 AC 596 ms
122,860 KB
testcase_40 AC 548 ms
122,836 KB
testcase_41 AC 546 ms
122,780 KB
testcase_42 AC 547 ms
122,848 KB
testcase_43 AC 558 ms
122,920 KB
testcase_44 AC 564 ms
122,716 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
ABC = [list(map(int, input().split())) for _ in range(N)]
X = [[0] * 32 for _ in range(N)]
INF = 10 ** 16
MAXX = [-INF] * 32

for i in range(N):
    A = ABC[i]
    for j in range(32):
        tmp = 0
        x = j
        for k in range(5):
            if x & 1:
                tmp += A[k]
            else:
                tmp -= A[k]
            x >>= 1
        X[i][j] = tmp
        MAXX[j] = max(MAXX[j], X[i][j])
for i in range(N):
    ans = 0
    for j in range(32):
        ans = max(ans, MAXX[j] - X[i][j])
    print(ans)
0