結果

問題 No.2261 Coffee
ユーザー ああいいああいい
提出日時 2023-04-08 18:29:54
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 739 bytes
コンパイル時間 253 ms
コンパイル使用メモリ 82,384 KB
実行使用メモリ 94,192 KB
最終ジャッジ日時 2024-04-14 15:18:15
合計ジャッジ時間 19,643 ms
ジャッジサーバーID
(参考情報)
judge4 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
53,160 KB
testcase_01 AC 37 ms
53,612 KB
testcase_02 AC 36 ms
52,900 KB
testcase_03 AC 37 ms
52,416 KB
testcase_04 AC 38 ms
54,176 KB
testcase_05 AC 44 ms
60,296 KB
testcase_06 AC 46 ms
62,400 KB
testcase_07 AC 38 ms
52,948 KB
testcase_08 AC 45 ms
61,688 KB
testcase_09 AC 43 ms
61,112 KB
testcase_10 AC 57 ms
66,040 KB
testcase_11 AC 57 ms
66,328 KB
testcase_12 AC 55 ms
65,540 KB
testcase_13 AC 54 ms
65,592 KB
testcase_14 AC 56 ms
65,680 KB
testcase_15 AC 53 ms
65,236 KB
testcase_16 AC 53 ms
65,668 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 AC 611 ms
90,848 KB
testcase_29 AC 595 ms
90,716 KB
testcase_30 AC 482 ms
87,624 KB
testcase_31 AC 715 ms
93,160 KB
testcase_32 AC 707 ms
93,248 KB
testcase_33 AC 707 ms
93,044 KB
testcase_34 AC 701 ms
93,160 KB
testcase_35 AC 733 ms
93,168 KB
testcase_36 AC 704 ms
92,964 KB
testcase_37 AC 708 ms
93,276 KB
testcase_38 WA -
testcase_39 WA -
testcase_40 WA -
testcase_41 WA -
testcase_42 WA -
testcase_43 WA -
testcase_44 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())

l = []
for _ in range(N):
    s = list(map(int,input().split()))
    l.append(s)

M = [-10 ** 10] * 32
m = [10 ** 10] * 32

for s in l:
    for bit in range(32):
        tmp = 0
        for i in range(5):
            if bit >> i & 1:
                tmp += s[i]
            else:
                tmp -= s[i]
        if tmp > M[bit]:M[bit] = tmp
        if tmp < m[bit]:m[bit] = tmp

for s in l:
    ans = 0
    for bit in range(32):
        tmp = 0
        for i in range(5):
            if bit >> i & 1:
                tmp += s[i]
            else:
                tmp -= s[i]
        t = abs(M[bit] - tmp)
        if t > ans:ans = t
        t = abs(m[bit] - tmp)
        if t > ans:
            ans = t
    print(ans)
0