結果

問題 No.1438 Broken Drawers
ユーザー NoaSaber
提出日時 2021-04-01 10:12:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 84 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 303 ms
コンパイル使用メモリ 82,480 KB
実行使用メモリ 104,344 KB
最終ジャッジ日時 2024-12-17 14:03:49
合計ジャッジ時間 3,176 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N=int(input())
ans=N
l=list(map(int,input().split()))
cnt=1
for i in range(N-1):
    if l[i]>l[i+1]:
        cnt+=1
    else:
        ans-=cnt//2
        cnt=1
ans-=cnt//2
print(ans)
0