結果
| 問題 | No.3017 交互浴 |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2026-10-02 13:38:58 |
| 言語 | PyPy3 (7.3.23 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 262 bytes |
| 記録 | |
| コンパイル時間 | 725 ms |
| コンパイル使用メモリ | 80,576 KB |
| 実行使用メモリ | 114,504 KB |
| 最終ジャッジ日時 | 2026-10-02 13:39:16 |
| 合計ジャッジ時間 | 16,127 ms |
|
ジャッジサーバーID (参考情報) |
judge1_1 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | WA * 1 |
| other | AC * 2 WA * 53 |
ソースコード
N = int(input())
H = list(map(int, input().split()))
bottom = 0
ans = 0
for i in range(N-1, -1, -1):
h = H[i]
if i%2==0:
#水色
ans += max(0, h-bottom)
else:
pass
bottom = max(bottom, h)
print(ans)
"""
5
7 3 2 4 5
"""