結果

問題 No.1438 Broken Drawers
ユーザー NoaSaberNoaSaber
提出日時 2021-04-01 10:12:14
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 118 ms / 2,000 ms
コード長 182 bytes
コンパイル時間 257 ms
コンパイル使用メモリ 87,096 KB
実行使用メモリ 107,460 KB
最終ジャッジ日時 2023-08-22 14:52:39
合計ジャッジ時間 4,382 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 72 ms
71,568 KB
testcase_01 AC 72 ms
71,328 KB
testcase_02 AC 72 ms
71,372 KB
testcase_03 AC 71 ms
71,212 KB
testcase_04 AC 70 ms
71,292 KB
testcase_05 AC 72 ms
71,300 KB
testcase_06 AC 114 ms
107,060 KB
testcase_07 AC 113 ms
106,960 KB
testcase_08 AC 72 ms
71,300 KB
testcase_09 AC 71 ms
71,332 KB
testcase_10 AC 73 ms
71,288 KB
testcase_11 AC 77 ms
76,704 KB
testcase_12 AC 89 ms
86,596 KB
testcase_13 AC 99 ms
94,676 KB
testcase_14 AC 85 ms
82,968 KB
testcase_15 AC 113 ms
103,852 KB
testcase_16 AC 113 ms
103,556 KB
testcase_17 AC 115 ms
106,868 KB
testcase_18 AC 118 ms
106,968 KB
testcase_19 AC 116 ms
107,132 KB
testcase_20 AC 115 ms
107,036 KB
testcase_21 AC 116 ms
106,756 KB
testcase_22 AC 116 ms
107,164 KB
testcase_23 AC 117 ms
107,456 KB
testcase_24 AC 117 ms
107,300 KB
testcase_25 AC 117 ms
107,292 KB
testcase_26 AC 118 ms
107,460 KB
testcase_27 AC 116 ms
107,080 KB
権限があれば一括ダウンロードができます

ソースコード

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