結果

問題 No.1438 Broken Drawers
ユーザー GER_chenGER_chen
提出日時 2021-03-26 21:41:56
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 108 ms / 2,000 ms
コード長 315 bytes
コンパイル時間 826 ms
コンパイル使用メモリ 87,260 KB
実行使用メモリ 107,544 KB
最終ジャッジ日時 2023-08-19 07:47:22
合計ジャッジ時間 4,985 ms
ジャッジサーバーID
(参考情報)
judge10 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 56 ms
71,284 KB
testcase_01 AC 56 ms
71,372 KB
testcase_02 AC 60 ms
71,336 KB
testcase_03 AC 60 ms
71,016 KB
testcase_04 AC 57 ms
71,448 KB
testcase_05 AC 59 ms
71,388 KB
testcase_06 AC 95 ms
107,036 KB
testcase_07 AC 97 ms
107,156 KB
testcase_08 AC 60 ms
71,456 KB
testcase_09 AC 59 ms
71,360 KB
testcase_10 AC 59 ms
71,020 KB
testcase_11 AC 65 ms
76,512 KB
testcase_12 AC 75 ms
86,916 KB
testcase_13 AC 84 ms
94,476 KB
testcase_14 AC 73 ms
82,768 KB
testcase_15 AC 100 ms
103,856 KB
testcase_16 AC 98 ms
103,392 KB
testcase_17 AC 100 ms
106,680 KB
testcase_18 AC 106 ms
107,380 KB
testcase_19 AC 100 ms
107,028 KB
testcase_20 AC 100 ms
106,980 KB
testcase_21 AC 100 ms
106,600 KB
testcase_22 AC 108 ms
107,448 KB
testcase_23 AC 106 ms
107,452 KB
testcase_24 AC 104 ms
107,544 KB
testcase_25 AC 104 ms
106,992 KB
testcase_26 AC 105 ms
107,084 KB
testcase_27 AC 105 ms
107,424 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

n = int(input())
A = list(map(int, input().split()))
flag = True
ans = n
for i in range(1, n):
    if A[i] < A[i-1]:
        if flag:
            flag = False
            ans -= 1
            check = A[i]
        else:
            if A[i-1] != check:
                check = A[i]
                ans -= 1
print(ans)
0