結果

問題 No.766 金魚すくい
ユーザー tailstails
提出日時 2018-12-14 01:07:14
言語 cLay
(20240104-1)
結果
AC  
実行時間 64 ms / 1,500 ms
コード長 381 bytes
コンパイル時間 3,282 ms
コンパイル使用メモリ 178,332 KB
実行使用メモリ 10,836 KB
最終ジャッジ日時 2023-09-19 00:15:03
合計ジャッジ時間 6,323 ms
ジャッジサーバーID
(参考情報)
judge15 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 6 ms
9,748 KB
testcase_01 AC 6 ms
9,724 KB
testcase_02 AC 6 ms
9,728 KB
testcase_03 AC 5 ms
9,732 KB
testcase_04 AC 6 ms
9,780 KB
testcase_05 AC 6 ms
9,724 KB
testcase_06 AC 6 ms
9,744 KB
testcase_07 AC 6 ms
9,992 KB
testcase_08 AC 6 ms
9,748 KB
testcase_09 AC 6 ms
9,728 KB
testcase_10 AC 5 ms
9,716 KB
testcase_11 AC 5 ms
9,724 KB
testcase_12 AC 6 ms
9,796 KB
testcase_13 AC 7 ms
9,820 KB
testcase_14 AC 6 ms
9,884 KB
testcase_15 AC 6 ms
9,724 KB
testcase_16 AC 6 ms
9,740 KB
testcase_17 AC 6 ms
9,728 KB
testcase_18 AC 7 ms
9,932 KB
testcase_19 AC 6 ms
9,856 KB
testcase_20 AC 6 ms
9,724 KB
testcase_21 AC 7 ms
9,784 KB
testcase_22 AC 7 ms
9,796 KB
testcase_23 AC 61 ms
10,720 KB
testcase_24 AC 61 ms
10,680 KB
testcase_25 AC 64 ms
10,776 KB
testcase_26 AC 60 ms
10,616 KB
testcase_27 AC 64 ms
10,772 KB
testcase_28 AC 60 ms
10,700 KB
testcase_29 AC 60 ms
10,632 KB
testcase_30 AC 61 ms
10,664 KB
testcase_31 AC 64 ms
10,836 KB
testcase_32 AC 61 ms
10,772 KB
testcase_33 AC 30 ms
10,744 KB
testcase_34 AC 30 ms
10,728 KB
testcase_35 AC 20 ms
9,736 KB
testcase_36 AC 19 ms
9,864 KB
testcase_37 AC 60 ms
10,712 KB
testcase_38 AC 61 ms
10,776 KB
testcase_39 AC 61 ms
10,772 KB
testcase_40 AC 59 ms
10,704 KB
testcase_41 AC 57 ms
10,512 KB
testcase_42 AC 56 ms
10,484 KB
testcase_43 AC 5 ms
9,780 KB
testcase_44 AC 5 ms
9,780 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,m,v[1d5];
mint p,q,r,s;

mint pow(mint a,int i){
     mint b=1;
     while(i){
	if(i&1) b*=a, --i;
	else a*=a, i>>=1;
     }
     return b;
}

{
	combination_mint comb;
	comb.init(3d5);

	rd(n,m,p,v(n));
	std::sort(v,v+n);
	q=100-p;
	p/=100;
	q/=100;

	rep(i,n) r+=pow(p,m)*pow(q,i)*comb.C(m+i-1,i)*s, s+=v[n-i-1];
	rep(j,m) r+=pow(p,j)*pow(q,n)*comb.C(j+n-1,j)*s;

	wt(r);
}
0