結果
| 問題 |
No.1438 Broken Drawers
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2021-03-26 21:52:06 |
| 言語 | PyPy3 (7.3.15) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 190 bytes |
| コンパイル時間 | 222 ms |
| コンパイル使用メモリ | 82,252 KB |
| 実行使用メモリ | 105,328 KB |
| 最終ジャッジ日時 | 2024-11-28 22:53:02 |
| 合計ジャッジ時間 | 3,470 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| 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)