結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2025-03-20 18:37:13 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 242 bytes |
コンパイル時間 | 181 ms |
コンパイル使用メモリ | 82,588 KB |
実行使用メモリ | 90,208 KB |
最終ジャッジ日時 | 2025-03-20 18:37:18 |
合計ジャッジ時間 | 4,714 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
import bisect n = int(input()) a = list(map(int, input().split())) tails = [] for num in a: idx = bisect.bisect_left(tails, num) if idx == len(tails): tails.append(num) else: tails[idx] = num print(n - len(tails))