結果

問題 No.2261 Coffee
ユーザー aaaaaaaaaa2230aaaaaaaaaa2230
提出日時 2023-04-07 21:40:40
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 500 bytes
コンパイル時間 316 ms
コンパイル使用メモリ 82,364 KB
実行使用メモリ 217,116 KB
最終ジャッジ日時 2024-04-10 16:47:44
合計ジャッジ時間 7,051 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 33 ms
59,800 KB
testcase_01 AC 34 ms
53,752 KB
testcase_02 AC 33 ms
53,028 KB
testcase_03 AC 34 ms
52,336 KB
testcase_04 AC 35 ms
53,424 KB
testcase_05 AC 34 ms
52,572 KB
testcase_06 AC 34 ms
53,232 KB
testcase_07 AC 35 ms
53,340 KB
testcase_08 AC 35 ms
53,544 KB
testcase_09 AC 35 ms
52,672 KB
testcase_10 AC 51 ms
64,760 KB
testcase_11 AC 53 ms
67,420 KB
testcase_12 AC 44 ms
62,780 KB
testcase_13 AC 45 ms
63,552 KB
testcase_14 AC 52 ms
67,044 KB
testcase_15 AC 41 ms
61,168 KB
testcase_16 AC 44 ms
62,812 KB
testcase_17 AC 152 ms
77,828 KB
testcase_18 AC 151 ms
77,744 KB
testcase_19 AC 142 ms
77,488 KB
testcase_20 AC 134 ms
77,696 KB
testcase_21 AC 154 ms
78,032 KB
testcase_22 AC 136 ms
77,808 KB
testcase_23 AC 157 ms
77,976 KB
testcase_24 TLE -
testcase_25 -- -
testcase_26 -- -
testcase_27 -- -
testcase_28 -- -
testcase_29 -- -
testcase_30 -- -
testcase_31 -- -
testcase_32 -- -
testcase_33 -- -
testcase_34 -- -
testcase_35 -- -
testcase_36 -- -
testcase_37 -- -
testcase_38 -- -
testcase_39 -- -
testcase_40 -- -
testcase_41 -- -
testcase_42 -- -
testcase_43 -- -
testcase_44 -- -
権限があれば一括ダウンロードができます

ソースコード

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 = []
    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,j])
    l.sort()
    mi = l[0][0]
    ma = l[-1][0]
    for x,ind in l:
        ans[ind] = max(ans[ind],ma-x,x-mi)
for i in ans:
    print(i)
0