結果
| 問題 |
No.2791 Beginner Contest
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2024-07-08 17:01:34 |
| 言語 | Python3 (3.13.1 + numpy 2.2.1 + scipy 1.14.1) |
| 結果 |
RE
|
| 実行時間 | - |
| コード長 | 382 bytes |
| コンパイル時間 | 296 ms |
| コンパイル使用メモリ | 12,544 KB |
| 実行使用メモリ | 10,752 KB |
| 最終ジャッジ日時 | 2024-07-08 17:01:37 |
| 合計ジャッジ時間 | 2,575 ms |
|
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | RE * 3 |
| other | RE * 17 |
ソースコード
from atcoder.lazysegtree import LazySegTree
N, K = map(int, input().split()); N -= K
mod = 998244353
def op(a, b):
return (a+b)%mod
def mapping(f, g):
return (f+g)%mod
def composition(f, g):
return (f+g)%mod
lst = LazySegTree(op, 0, mapping, composition, 0, [1]*(N+1))
for i in range(N):
if i + K <= N:
lst.apply(i+K, N+1, lst.get(i))
print(lst.all_prod()+1)