結果
| 問題 |
No.2261 Coffee
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2023-04-07 21:40:40 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
TLE
|
| 実行時間 | - |
| コード長 | 500 bytes |
| コンパイル時間 | 247 ms |
| コンパイル使用メモリ | 82,376 KB |
| 実行使用メモリ | 200,100 KB |
| 最終ジャッジ日時 | 2024-10-02 19:13:35 |
| 合計ジャッジ時間 | 7,028 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 21 TLE * 1 -- * 20 |
ソースコード
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)