結果

問題 No.2261 Coffee
コンテスト
ユーザー aaaaaaaaaa2230
提出日時 2023-04-07 21:40:40
言語 PyPy3
(7.3.23 + ACL)
コンパイル:
pypy3 -mpy_compile _filename_
実行:
pypy3 _filename_
結果
TLE  
実行時間 -
コード長 500 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 83 ms
コンパイル使用メモリ 80,896 KB
実行使用メモリ 258,360 KB
最終ジャッジ日時 2026-09-09 04:30:34
合計ジャッジ時間 58,324 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge3_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25 TLE * 17
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

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