結果

問題 No.2261 Coffee
ユーザー ニックネームニックネーム
提出日時 2023-04-07 22:19:13
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 346 ms / 2,000 ms
コード長 363 bytes
コンパイル時間 331 ms
コンパイル使用メモリ 82,504 KB
実行使用メモリ 122,632 KB
最終ジャッジ日時 2024-04-10 17:20:27
合計ジャッジ時間 11,019 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
53,472 KB
testcase_01 AC 31 ms
52,704 KB
testcase_02 AC 31 ms
52,196 KB
testcase_03 AC 32 ms
53,952 KB
testcase_04 AC 33 ms
52,584 KB
testcase_05 AC 32 ms
52,280 KB
testcase_06 AC 34 ms
52,728 KB
testcase_07 AC 33 ms
53,408 KB
testcase_08 AC 32 ms
52,384 KB
testcase_09 AC 33 ms
52,792 KB
testcase_10 AC 49 ms
65,332 KB
testcase_11 AC 55 ms
65,856 KB
testcase_12 AC 47 ms
62,528 KB
testcase_13 AC 41 ms
63,224 KB
testcase_14 AC 47 ms
65,332 KB
testcase_15 AC 42 ms
61,608 KB
testcase_16 AC 43 ms
63,728 KB
testcase_17 AC 89 ms
77,220 KB
testcase_18 AC 89 ms
77,536 KB
testcase_19 AC 89 ms
77,364 KB
testcase_20 AC 88 ms
77,200 KB
testcase_21 AC 90 ms
77,916 KB
testcase_22 AC 89 ms
77,428 KB
testcase_23 AC 91 ms
77,528 KB
testcase_24 AC 315 ms
120,520 KB
testcase_25 AC 282 ms
113,024 KB
testcase_26 AC 328 ms
119,832 KB
testcase_27 AC 315 ms
119,944 KB
testcase_28 AC 273 ms
116,876 KB
testcase_29 AC 280 ms
119,040 KB
testcase_30 AC 235 ms
108,080 KB
testcase_31 AC 318 ms
122,236 KB
testcase_32 AC 304 ms
121,644 KB
testcase_33 AC 305 ms
121,972 KB
testcase_34 AC 304 ms
122,220 KB
testcase_35 AC 316 ms
121,984 KB
testcase_36 AC 325 ms
122,632 KB
testcase_37 AC 300 ms
122,372 KB
testcase_38 AC 339 ms
118,780 KB
testcase_39 AC 342 ms
118,620 KB
testcase_40 AC 338 ms
118,796 KB
testcase_41 AC 329 ms
118,476 KB
testcase_42 AC 346 ms
118,684 KB
testcase_43 AC 327 ms
119,068 KB
testcase_44 AC 335 ms
118,760 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
p = [list(map(int,input().split())) for _ in range(n)]
ans = [0]*n
for s in range(16):
    q = []
    for pi in p:
        q.append(pi[4])
        for i in range(4):
            if s>>i&1: q[-1] += pi[i]
            else: q[-1] -= pi[i]
    ma = max(q); mi = min(q)
    for i,v in enumerate(q): ans[i] = max(ans[i],ma-v,v-mi)
print(*ans,sep="\n")
0