結果

問題 No.1438 Broken Drawers
ユーザー penguinmanpenguinman
提出日時 2021-06-15 06:17:40
言語 Python3
(3.12.2 + numpy 1.26.4 + scipy 1.12.0)
結果
AC  
実行時間 143 ms / 2,000 ms
コード長 183 bytes
コンパイル時間 67 ms
コンパイル使用メモリ 10,548 KB
実行使用メモリ 30,712 KB
最終ジャッジ日時 2023-08-26 20:40:47
合計ジャッジ時間 4,749 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 15 ms
7,764 KB
testcase_01 AC 16 ms
7,936 KB
testcase_02 AC 14 ms
7,916 KB
testcase_03 AC 14 ms
7,796 KB
testcase_04 AC 14 ms
7,860 KB
testcase_05 AC 14 ms
7,836 KB
testcase_06 AC 127 ms
29,780 KB
testcase_07 AC 143 ms
29,844 KB
testcase_08 AC 15 ms
7,800 KB
testcase_09 AC 14 ms
7,908 KB
testcase_10 AC 15 ms
7,752 KB
testcase_11 AC 20 ms
9,180 KB
testcase_12 AC 60 ms
16,396 KB
testcase_13 AC 88 ms
21,920 KB
testcase_14 AC 45 ms
13,908 KB
testcase_15 AC 126 ms
29,384 KB
testcase_16 AC 129 ms
27,656 KB
testcase_17 AC 134 ms
29,932 KB
testcase_18 AC 135 ms
30,072 KB
testcase_19 AC 139 ms
30,236 KB
testcase_20 AC 135 ms
30,588 KB
testcase_21 AC 133 ms
30,024 KB
testcase_22 AC 141 ms
30,712 KB
testcase_23 AC 140 ms
29,728 KB
testcase_24 AC 138 ms
29,784 KB
testcase_25 AC 139 ms
29,796 KB
testcase_26 AC 140 ms
29,792 KB
testcase_27 AC 141 ms
29,960 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
A = list(map(int,input().split()))
ans = N
flag = 0
for i in range(1,N):
    if A[i-1] > A[i]:
        flag ^= 1
    else:
        flag = 0
    ans -= flag
print(ans)
0