結果

問題 No.1438 Broken Drawers
ユーザー pluto77pluto77
提出日時 2021-07-17 09:38:56
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 169 bytes
コンパイル時間 106 ms
コンパイル使用メモリ 10,564 KB
実行使用メモリ 30,804 KB
最終ジャッジ日時 2023-09-21 02:25:37
合計ジャッジ時間 4,638 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 16 ms
7,976 KB
testcase_01 AC 16 ms
7,936 KB
testcase_02 AC 16 ms
7,848 KB
testcase_03 AC 15 ms
7,916 KB
testcase_04 AC 15 ms
7,868 KB
testcase_05 AC 15 ms
7,820 KB
testcase_06 AC 136 ms
29,924 KB
testcase_07 AC 122 ms
29,844 KB
testcase_08 AC 15 ms
7,856 KB
testcase_09 AC 15 ms
7,936 KB
testcase_10 AC 15 ms
7,916 KB
testcase_11 AC 20 ms
9,188 KB
testcase_12 AC 59 ms
16,316 KB
testcase_13 AC 84 ms
21,968 KB
testcase_14 AC 45 ms
14,040 KB
testcase_15 AC 121 ms
29,252 KB
testcase_16 AC 121 ms
27,760 KB
testcase_17 AC 127 ms
29,896 KB
testcase_18 AC 130 ms
30,052 KB
testcase_19 AC 129 ms
30,276 KB
testcase_20 AC 133 ms
30,596 KB
testcase_21 AC 129 ms
29,952 KB
testcase_22 AC 131 ms
30,804 KB
testcase_23 AC 133 ms
29,920 KB
testcase_24 AC 132 ms
29,820 KB
testcase_25 AC 132 ms
29,924 KB
testcase_26 AC 132 ms
29,880 KB
testcase_27 AC 131 ms
30,028 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#yuki1438
n=int(input())
a=list(map(int,input().split()))
res=n
cnt=1
for i in range(n-1):
 if a[i]>a[i+1]:
  cnt+=1
 else:
  res-=cnt//2
  cnt=1
res-=cnt//2
print(res)
0