結果
| 問題 | No.711 競技レーティング単調増加 | 
| コンテスト | |
| ユーザー |  gew1fw | 
| 提出日時 | 2025-06-12 19:17:46 | 
| 言語 | PyPy3 (7.3.15) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 374 bytes | 
| コンパイル時間 | 268 ms | 
| コンパイル使用メモリ | 82,528 KB | 
| 実行使用メモリ | 120,024 KB | 
| 最終ジャッジ日時 | 2025-06-12 19:17:53 | 
| 合計ジャッジ時間 | 6,279 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 14 WA * 27 | 
ソースコード
import bisect
def main():
    import sys
    input = sys.stdin.read().split()
    n = int(input[0])
    a = list(map(int, input[1:n+1]))
    
    tail = []
    for x in a:
        pos = bisect.bisect_left(tail, x)
        if pos == len(tail):
            tail.append(x)
        else:
            tail[pos] = x
    print(n - len(tail))
if __name__ == "__main__":
    main()
            
            
            
        