結果
| 問題 | No.1438 Broken Drawers |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-26 21:52:06 |
| 言語 | PyPy3 (8.0.0 + ACL) |
| 結果 |
WA
不安定
|
| 実行時間 | - |
| コード長 | 190 bytes |
| 記録 | |
| コンパイル時間 | 66 ms |
| コンパイル使用メモリ | 81,744 KB |
| 実行使用メモリ | 107,368 KB |
| 最終ジャッジ日時 | 2026-10-01 15:13:25 |
| 合計ジャッジ時間 | 4,288 ms |
|
ジャッジサーバーID (参考情報) |
judge1_0 / judge4_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 WA * 20 |
ソースコード
N = int(input())
A = list(map(int, input().split()))
ans = (N+1)//2
for i in range(0,N-1,2):
if i+2<N:
if A[i]<A[i+1]<A[i+2]:
ans += 1
elif A[i]<A[i+1]:
ans += 1
print(ans)