結果
問題 | No.2711 Connecting Lights |
ユーザー |
![]() |
提出日時 | 2024-04-01 11:33:37 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 275 bytes |
コンパイル時間 | 5,501 ms |
コンパイル使用メモリ | 204,252 KB |
実行使用メモリ | 7,624 KB |
最終ジャッジ日時 | 2024-09-30 21:46:14 |
合計ジャッジ時間 | 6,279 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 27 |
ソースコード
#define MD 998244353Comb<Mint>c;ll@n,@m,@k;if(m==1){wt(1<<n);exit(0);}Matrix<Mint>a(n+1-k,n+1-k),v(n+1-k,1),r;rep(y,n+1-k){rep(x,n+1-k){a[y][x]=sum[i,0,y+1](c.C(k+x,k+i)*c.C(n-(k+x),y-i));}v[y][0]=c.C(n,k+y);}a**=m-1;r=a*v;wt(sum[i,0,n+1-k](r[0][i]));