結果
問題 | No.1438 Broken Drawers |
ユーザー |
![]() |
提出日時 | 2021-03-26 21:41:56 |
言語 | PyPy3 (7.3.15) |
結果 |
AC
|
実行時間 | 84 ms / 2,000 ms |
コード長 | 315 bytes |
コンパイル時間 | 222 ms |
コンパイル使用メモリ | 82,892 KB |
実行使用メモリ | 104,188 KB |
最終ジャッジ日時 | 2024-11-28 22:23:37 |
合計ジャッジ時間 | 3,151 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 25 |
ソースコード
n = int(input())A = list(map(int, input().split()))flag = Trueans = nfor i in range(1, n):if A[i] < A[i-1]:if flag:flag = Falseans -= 1check = A[i]else:if A[i-1] != check:check = A[i]ans -= 1print(ans)