結果

問題 No.2261 Coffee
ユーザー okapinokapin
提出日時 2023-04-07 22:22:55
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 343 ms / 2,000 ms
コード長 536 bytes
コンパイル時間 448 ms
コンパイル使用メモリ 82,428 KB
実行使用メモリ 89,556 KB
最終ジャッジ日時 2024-04-10 17:22:58
合計ジャッジ時間 10,574 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 36 ms
52,872 KB
testcase_01 AC 36 ms
53,132 KB
testcase_02 AC 35 ms
52,404 KB
testcase_03 AC 36 ms
53,164 KB
testcase_04 AC 35 ms
53,140 KB
testcase_05 AC 34 ms
53,620 KB
testcase_06 AC 34 ms
53,272 KB
testcase_07 AC 34 ms
53,136 KB
testcase_08 AC 36 ms
53,780 KB
testcase_09 AC 34 ms
52,132 KB
testcase_10 AC 50 ms
65,572 KB
testcase_11 AC 54 ms
66,544 KB
testcase_12 AC 52 ms
67,240 KB
testcase_13 AC 50 ms
65,316 KB
testcase_14 AC 52 ms
66,840 KB
testcase_15 AC 44 ms
62,884 KB
testcase_16 AC 48 ms
65,144 KB
testcase_17 AC 76 ms
77,316 KB
testcase_18 AC 74 ms
77,524 KB
testcase_19 AC 72 ms
77,152 KB
testcase_20 AC 71 ms
76,768 KB
testcase_21 AC 75 ms
77,384 KB
testcase_22 AC 75 ms
76,808 KB
testcase_23 AC 73 ms
77,404 KB
testcase_24 AC 317 ms
88,484 KB
testcase_25 AC 268 ms
86,600 KB
testcase_26 AC 343 ms
89,516 KB
testcase_27 AC 301 ms
88,796 KB
testcase_28 AC 243 ms
87,608 KB
testcase_29 AC 244 ms
86,940 KB
testcase_30 AC 205 ms
84,468 KB
testcase_31 AC 288 ms
89,436 KB
testcase_32 AC 288 ms
89,084 KB
testcase_33 AC 292 ms
89,556 KB
testcase_34 AC 285 ms
89,344 KB
testcase_35 AC 301 ms
89,216 KB
testcase_36 AC 298 ms
89,228 KB
testcase_37 AC 289 ms
89,472 KB
testcase_38 AC 314 ms
89,292 KB
testcase_39 AC 329 ms
89,104 KB
testcase_40 AC 324 ms
89,240 KB
testcase_41 AC 309 ms
89,508 KB
testcase_42 AC 329 ms
89,432 KB
testcase_43 AC 312 ms
89,312 KB
testcase_44 AC 316 ms
89,496 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
arr = [[0]*n for _ in range(16)]
for i in range(n):
    a = list(map(int, input().split()))
    for bit in range(1 << 4):
        amo = a[0]
        for j in range(4):
            if bit & (1 << j):
                amo += a[j+1]
            else:
                amo -= a[j+1]
        arr[bit][i] = amo

mx = [0]*16
mn = [0]*16
for i in range(16):
    mx[i], mn[i] = max(arr[i]), min(arr[i])
for j in range(n):
    res = 0
    for i in range(16):
        res = max(res, mx[i]-arr[i][j], arr[i][j]-mn[i])
    print(res)
0