結果

問題 No.1438 Broken Drawers
ユーザー marroncastlemarroncastle
提出日時 2021-03-26 22:12:36
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 135 ms / 2,000 ms
コード長 184 bytes
コンパイル時間 304 ms
コンパイル使用メモリ 87,232 KB
実行使用メモリ 110,888 KB
最終ジャッジ日時 2023-08-19 08:36:22
合計ジャッジ時間 4,864 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 79 ms
71,276 KB
testcase_01 AC 74 ms
71,224 KB
testcase_02 AC 74 ms
71,216 KB
testcase_03 AC 73 ms
71,380 KB
testcase_04 AC 74 ms
71,348 KB
testcase_05 AC 73 ms
71,224 KB
testcase_06 AC 122 ms
110,520 KB
testcase_07 AC 121 ms
110,308 KB
testcase_08 AC 74 ms
71,180 KB
testcase_09 AC 72 ms
71,344 KB
testcase_10 AC 78 ms
71,388 KB
testcase_11 AC 81 ms
76,436 KB
testcase_12 AC 95 ms
87,732 KB
testcase_13 AC 105 ms
96,392 KB
testcase_14 AC 90 ms
83,492 KB
testcase_15 AC 127 ms
106,940 KB
testcase_16 AC 122 ms
106,576 KB
testcase_17 AC 129 ms
109,740 KB
testcase_18 AC 132 ms
110,408 KB
testcase_19 AC 127 ms
110,264 KB
testcase_20 AC 126 ms
110,184 KB
testcase_21 AC 127 ms
109,796 KB
testcase_22 AC 131 ms
110,488 KB
testcase_23 AC 133 ms
110,888 KB
testcase_24 AC 135 ms
110,872 KB
testcase_25 AC 131 ms
110,824 KB
testcase_26 AC 133 ms
110,704 KB
testcase_27 AC 131 ms
110,696 KB
権限があれば一括ダウンロードができます

ソースコード

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