結果
問題 | No.1706 Many Bus Stops (hard) |
ユーザー |
![]() |
提出日時 | 2021-10-08 23:00:52 |
言語 | cLay (20241019-1) |
結果 |
AC
|
実行時間 | 2 ms / 2,000 ms |
コード長 | 231 bytes |
コンパイル時間 | 4,840 ms |
コンパイル使用メモリ | 177,428 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-23 06:19:59 |
合計ジャッジ時間 | 6,101 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 41 |
ソースコード
ll@c,@n,@m;Matrix<Mint>a(4,4);a[0...3][0..3]=0;Mint ic=Mint(1)/Mint(c);a[0][0]=ic;a[0][1]=1-ic;a[1][2]=1;a[2][2]=ic;a[2][3]=1-ic;a[3][0]=Mint(1)/Mint(c-1);a[3][2]=1-Mint(1)/Mint(c-1);Mint p=(a**n)[0][0];wt(1-(1-p)**m);