結果
問題 |
No.365 ジェンガソート
|
ユーザー |
![]() |
提出日時 | 2020-12-30 10:21:33 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 221 bytes |
コンパイル時間 | 289 ms |
コンパイル使用メモリ | 82,572 KB |
実行使用メモリ | 90,624 KB |
最終ジャッジ日時 | 2024-10-06 21:18:23 |
合計ジャッジ時間 | 4,194 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 16 WA * 25 |
ソースコード
n = int(input()) A = list(map(int, input().split())) import bisect INF = 10**18 dp = [INF]*(n+1) dp[0] = -INF l = 0 for a in A: x = bisect.bisect_right(dp, a) dp[x] = min(dp[x], a) l = max(l, x) print(n-l)