結果

問題 No.1227 I hate ThREE
ユーザー tailstails
提出日時 2020-09-13 22:34:09
言語 cLay
(20240104-1)
結果
AC  
実行時間 59 ms / 2,000 ms
コード長 316 bytes
コンパイル時間 2,752 ms
コンパイル使用メモリ 172,980 KB
実行使用メモリ 63,036 KB
最終ジャッジ日時 2023-09-19 01:10:02
合計ジャッジ時間 7,221 ms
ジャッジサーバーID
(参考情報)
judge13 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 41 ms
60,816 KB
testcase_01 AC 42 ms
62,716 KB
testcase_02 AC 42 ms
62,720 KB
testcase_03 AC 42 ms
62,776 KB
testcase_04 AC 42 ms
62,708 KB
testcase_05 AC 43 ms
62,716 KB
testcase_06 AC 41 ms
62,724 KB
testcase_07 AC 41 ms
62,792 KB
testcase_08 AC 47 ms
62,708 KB
testcase_09 AC 47 ms
62,716 KB
testcase_10 AC 45 ms
62,712 KB
testcase_11 AC 58 ms
62,712 KB
testcase_12 AC 59 ms
62,860 KB
testcase_13 AC 43 ms
62,828 KB
testcase_14 AC 46 ms
62,708 KB
testcase_15 AC 48 ms
62,704 KB
testcase_16 AC 52 ms
62,776 KB
testcase_17 AC 49 ms
62,708 KB
testcase_18 AC 54 ms
62,720 KB
testcase_19 AC 52 ms
62,992 KB
testcase_20 AC 55 ms
62,780 KB
testcase_21 AC 43 ms
62,856 KB
testcase_22 AC 53 ms
62,716 KB
testcase_23 AC 58 ms
62,856 KB
testcase_24 AC 59 ms
62,840 KB
testcase_25 AC 59 ms
62,848 KB
testcase_26 AC 59 ms
62,720 KB
testcase_27 AC 59 ms
62,848 KB
testcase_28 AC 59 ms
62,712 KB
testcase_29 AC 59 ms
62,916 KB
testcase_30 AC 58 ms
62,924 KB
testcase_31 AC 59 ms
62,916 KB
testcase_32 AC 59 ms
62,920 KB
testcase_33 AC 58 ms
62,852 KB
testcase_34 AC 59 ms
62,716 KB
testcase_35 AC 58 ms
63,036 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

graph g;
ll n,c,d;
int a[2d3],b[2d3];
Mint e[2d3][7d3],z;
void f(int i,int p){
	e[i][3..d+2]=1;
	rep[g.edge[i]](j,g.es[i]){
		if(j!=p){
			f(j,i);
			rep(k,d)e[i][k+3]*=e[j][k]+e[j][k+6];
		}
	}
}
{
	rd(n,c,(a,b)(n-1));
	g.setEdge(n+1,n-1,a,b);
	d=min(c,6d3);
	f(1,0);
	z=(c-d)*e[1][3d3];
	z+=e[1][3..d+2];
	wt(z);
}
0