結果
問題 | No.992 最長増加部分列の数え上げ |
ユーザー |
![]() |
提出日時 | 2020-02-15 21:34:20 |
言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
結果 |
AC
|
実行時間 | 712 ms / 2,000 ms |
コード長 | 341 bytes |
コンパイル時間 | 246 ms |
コンパイル使用メモリ | 12,288 KB |
実行使用メモリ | 52,936 KB |
最終ジャッジ日時 | 2024-10-06 14:06:17 |
合計ジャッジ時間 | 20,655 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge5 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 42 |
ソースコード
from bisect import bisect, bisect_leftm = 10**9+7n = int(input())a = map(int, input().split())s, t, c = [], [], []for v in a:l = bisect_left(t, v)if l == len(t): s.append([]); t.append(v); c.append(0)o = c[l-1] + s[l-1][bisect(s[l-1], (-v, 0))][1] if l else 1s[l].append((-v, -c[l]))t[l] = vc[l] += oc[l] %= mprint(c[-1])