結果
問題 |
No.711 競技レーティング単調増加
|
ユーザー |
![]() |
提出日時 | 2025-03-20 21:14:46 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 256 bytes |
コンパイル時間 | 306 ms |
コンパイル使用メモリ | 82,780 KB |
実行使用メモリ | 108,520 KB |
最終ジャッジ日時 | 2025-03-20 21:15:26 |
合計ジャッジ時間 | 6,144 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 24 WA * 17 |
ソースコード
import bisect n = int(input()) A = list(map(int, input().split())) C = [A[i] - (i + 1) for i in range(n)] dp = [] for c in C: idx = bisect.bisect_right(dp, c) if idx == len(dp): dp.append(c) else: dp[idx] = c print(n - len(dp))