結果

問題 No.1438 Broken Drawers
ユーザー marroncastle
提出日時 2021-03-26 22:12:36
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 100 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 173 ms
コンパイル使用メモリ 82,048 KB
実行使用メモリ 106,880 KB
最終ジャッジ日時 2024-11-28 23:29:07
合計ジャッジ時間 3,323 ms
ジャッジサーバーID
(参考情報)
judge1 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 25
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int, input().split()))
ans = 1
lis = [True]+[False]*(N-1)
for i in range(1,N):
  if A[i-1]<A[i] or not lis[i-1]:
    lis[i] = True
    ans += 1
print(ans)
0