結果

問題 No.2833 Count Taiko Results
ユーザー 👑 p-adic
提出日時 2024-06-19 07:42:54
言語 cLay
(20241019-1)
結果
AC  
実行時間 93 ms / 2,000 ms
コード長 220 bytes
コンパイル時間 2,924 ms
コンパイル使用メモリ 177,312 KB
実行使用メモリ 8,576 KB
最終ジャッジ日時 2024-06-21 10:08:54
合計ジャッジ時間 5,309 ms
ジャッジサーバーID
(参考情報)
judge5 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 58
権限があれば一括ダウンロードができます

ソースコード

diff #

#define MD 998244353
ll@N,@K,@A[N],@B[N];Mint a=0,t[N+1]{1},s,p;REP(m,K-1,K+1){s=p=1;rep(i,N)s=(i<m?s:s-p*t[i-m])*A[i]+(t[i+1]=s*B[i]),p*=A[i],i<m?p:p/=A[i-m];s=0;p=1;REP(k,m+1)s+=t[N-k]*p,p*=A[N-1-k];a+=m<K?-s:s;}wt(a);
0