結果

問題 No.2261 Coffee
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-04-07 21:42:18
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 358 ms / 2,000 ms
コード長 544 bytes
コンパイル時間 263 ms
コンパイル使用メモリ 82,292 KB
実行使用メモリ 120,488 KB
最終ジャッジ日時 2024-04-10 16:49:29
合計ジャッジ時間 11,392 ms
ジャッジサーバーID
(参考情報)
judge2 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
52,396 KB
testcase_01 AC 33 ms
53,764 KB
testcase_02 AC 32 ms
52,564 KB
testcase_03 AC 32 ms
53,156 KB
testcase_04 AC 31 ms
53,004 KB
testcase_05 AC 31 ms
53,188 KB
testcase_06 AC 32 ms
52,920 KB
testcase_07 AC 32 ms
52,804 KB
testcase_08 AC 33 ms
52,480 KB
testcase_09 AC 32 ms
53,920 KB
testcase_10 AC 41 ms
62,704 KB
testcase_11 AC 46 ms
64,884 KB
testcase_12 AC 45 ms
62,260 KB
testcase_13 AC 41 ms
62,344 KB
testcase_14 AC 43 ms
63,144 KB
testcase_15 AC 40 ms
62,688 KB
testcase_16 AC 41 ms
62,724 KB
testcase_17 AC 96 ms
77,208 KB
testcase_18 AC 101 ms
77,484 KB
testcase_19 AC 100 ms
77,204 KB
testcase_20 AC 97 ms
77,648 KB
testcase_21 AC 96 ms
77,568 KB
testcase_22 AC 88 ms
77,436 KB
testcase_23 AC 90 ms
77,332 KB
testcase_24 AC 336 ms
120,288 KB
testcase_25 AC 290 ms
114,116 KB
testcase_26 AC 335 ms
118,236 KB
testcase_27 AC 320 ms
117,964 KB
testcase_28 AC 296 ms
117,472 KB
testcase_29 AC 286 ms
116,320 KB
testcase_30 AC 242 ms
106,664 KB
testcase_31 AC 332 ms
118,496 KB
testcase_32 AC 321 ms
119,588 KB
testcase_33 AC 311 ms
118,576 KB
testcase_34 AC 324 ms
118,612 KB
testcase_35 AC 306 ms
120,488 KB
testcase_36 AC 319 ms
119,428 KB
testcase_37 AC 307 ms
118,692 KB
testcase_38 AC 340 ms
118,788 KB
testcase_39 AC 356 ms
119,208 KB
testcase_40 AC 358 ms
119,424 KB
testcase_41 AC 349 ms
119,320 KB
testcase_42 AC 352 ms
119,468 KB
testcase_43 AC 353 ms
118,272 KB
testcase_44 AC 338 ms
119,212 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
ABCDE = [list(map(int,input().split())) for i in range(n)]

ans = [0]*n

for i in range(1<<5):
    if i & 1:
        continue

    l = []
    mi = 10**30
    ma = -10**30
    for j in range(n):

        num = 0
        for x in range(5):
            if i >> x & 1:
                num += ABCDE[j][x]
            else:
                num -= ABCDE[j][x]

        l.append(num)
        mi = min(mi,num)
        ma = max(ma,num)

    for ind,x in enumerate(l):
        ans[ind] = max(ans[ind],ma-x,x-mi)
for i in ans:
    print(i)
0