結果
| 問題 | No.711 競技レーティング単調増加 | 
| コンテスト | |
| ユーザー |  gew1fw | 
| 提出日時 | 2025-06-12 19:18:12 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 216 bytes | 
| コンパイル時間 | 231 ms | 
| コンパイル使用メモリ | 81,968 KB | 
| 実行使用メモリ | 107,244 KB | 
| 最終ジャッジ日時 | 2025-06-12 19:18:19 | 
| 合計ジャッジ時間 | 5,352 ms | 
| ジャッジサーバーID (参考情報) | judge2 / judge1 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 14 WA * 27 | 
ソースコード
import bisect
n = int(input())
A = list(map(int, input().split()))
dp = []
for x in A:
    pos = bisect.bisect_left(dp, x)
    if pos == len(dp):
        dp.append(x)
    else:
        dp[pos] = x
print(n - len(dp))
            
            
            
        