結果

問題 No.711 競技レーティング単調増加
ユーザー gew1fw
提出日時 2025-06-12 13:26:56
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 275 bytes
コンパイル時間 198 ms
コンパイル使用メモリ 82,908 KB
実行使用メモリ 108,928 KB
最終ジャッジ日時 2025-06-12 13:32:24
合計ジャッジ時間 6,172 ms
ジャッジサーバーID
(参考情報)
judge2 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 14 WA * 27
権限があれば一括ダウンロードができます

ソースコード

diff #

import bisect

n = int(input())
a = list(map(int, input().split()))
transformed = [x - 1 for x in a]
lis = []

for num in transformed:
    idx = bisect.bisect_left(lis, num)
    if idx == len(lis):
        lis.append(num)
    else:
        lis[idx] = num

print(n - len(lis))
0