結果

問題 No.318 学学学学学
ユーザー tktk_snsntktk_snsn
提出日時 2020-12-15 21:30:59
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
WA  
実行時間 -
コード長 219 bytes
コンパイル時間 91 ms
コンパイル使用メモリ 11,744 KB
実行使用メモリ 21,588 KB
最終ジャッジ日時 2023-10-20 06:44:22
合計ジャッジ時間 5,233 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 WA -
testcase_01 WA -
testcase_02 WA -
testcase_03 WA -
testcase_04 WA -
testcase_05 WA -
testcase_06 WA -
testcase_07 AC 166 ms
21,060 KB
testcase_08 AC 165 ms
21,060 KB
testcase_09 AC 165 ms
21,060 KB
testcase_10 AC 165 ms
21,060 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 WA -
testcase_16 WA -
testcase_17 AC 166 ms
21,588 KB
testcase_18 WA -
testcase_19 AC 166 ms
21,588 KB
testcase_20 WA -
testcase_21 AC 30 ms
10,080 KB
testcase_22 AC 29 ms
10,080 KB
testcase_23 AC 29 ms
10,080 KB
testcase_24 AC 29 ms
10,080 KB
testcase_25 AC 29 ms
10,080 KB
testcase_26 AC 29 ms
10,080 KB
testcase_27 AC 29 ms
10,080 KB
testcase_28 AC 29 ms
10,080 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from itertools import accumulate
n = int(input())
A = list(map(int, input().split()))

B = list(accumulate(A, func=max))
C = list(accumulate(A[::-1], func=max))[::-1]

ans = [min(b, c) for b, c in zip(B, C)]
print(*ans)
0