結果

問題 No.711 競技レーティング単調増加
ユーザー 👑 rin204rin204
提出日時 2024-03-20 23:41:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 254 bytes
コンパイル時間 502 ms
コンパイル使用メモリ 81,700 KB
実行使用メモリ 120,068 KB
最終ジャッジ日時 2024-03-20 23:41:43
合計ジャッジ時間 6,715 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 39 ms
53,460 KB
testcase_01 AC 38 ms
53,460 KB
testcase_02 AC 42 ms
53,460 KB
testcase_03 WA -
testcase_04 AC 38 ms
53,460 KB
testcase_05 WA -
testcase_06 AC 38 ms
53,460 KB
testcase_07 AC 39 ms
53,460 KB
testcase_08 AC 38 ms
53,460 KB
testcase_09 AC 40 ms
53,460 KB
testcase_10 AC 39 ms
53,460 KB
testcase_11 AC 42 ms
53,460 KB
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 38 ms
53,460 KB
testcase_16 AC 39 ms
53,460 KB
testcase_17 AC 38 ms
53,460 KB
testcase_18 WA -
testcase_19 WA -
testcase_20 WA -
testcase_21 WA -
testcase_22 WA -
testcase_23 WA -
testcase_24 WA -
testcase_25 WA -
testcase_26 WA -
testcase_27 WA -
testcase_28 WA -
testcase_29 WA -
testcase_30 AC 130 ms
110,480 KB
testcase_31 AC 137 ms
103,412 KB
testcase_32 AC 142 ms
103,772 KB
testcase_33 AC 146 ms
119,760 KB
testcase_34 AC 141 ms
114,660 KB
testcase_35 AC 151 ms
120,068 KB
testcase_36 AC 113 ms
116,884 KB
testcase_37 AC 138 ms
111,536 KB
testcase_38 AC 113 ms
114,416 KB
testcase_39 AC 84 ms
95,240 KB
testcase_40 AC 116 ms
101,420 KB
testcase_41 AC 40 ms
53,460 KB
testcase_42 AC 96 ms
95,376 KB
testcase_43 AC 118 ms
105,328 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from bisect import bisect_right

n = int(input())
A = list(map(int, input().split()))
A = [a - i for i, a in enumerate(A)]
B = []
for a in A:
    p = bisect_right(B, a)
    if p == len(B):
        B.append(a)
    else:
        B[p] = a
print(n - len(B))
0