結果

問題 No.763 Noelちゃんと木遊び
ユーザー %20%20
提出日時 2018-12-11 03:34:52
言語 cLay
(20240104-1)
結果
AC  
実行時間 42 ms / 2,000 ms
コード長 190 bytes
コンパイル時間 1,770 ms
コンパイル使用メモリ 162,496 KB
実行使用メモリ 21,176 KB
最終ジャッジ日時 2023-09-19 00:13:40
合計ジャッジ時間 3,496 ms
ジャッジサーバーID
(参考情報)
judge14 / judge13
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 25 ms
21,176 KB
testcase_01 AC 14 ms
12,764 KB
testcase_02 AC 30 ms
14,452 KB
testcase_03 AC 21 ms
13,612 KB
testcase_04 AC 16 ms
13,148 KB
testcase_05 AC 21 ms
13,428 KB
testcase_06 AC 36 ms
15,172 KB
testcase_07 AC 36 ms
15,080 KB
testcase_08 AC 21 ms
13,588 KB
testcase_09 AC 15 ms
12,904 KB
testcase_10 AC 8 ms
12,068 KB
testcase_11 AC 42 ms
15,340 KB
testcase_12 AC 34 ms
14,764 KB
testcase_13 AC 34 ms
14,688 KB
testcase_14 AC 31 ms
14,372 KB
testcase_15 AC 21 ms
13,476 KB
testcase_16 AC 7 ms
11,884 KB
testcase_17 AC 20 ms
13,532 KB
testcase_18 AC 39 ms
15,208 KB
testcase_19 AC 37 ms
14,896 KB
testcase_20 AC 36 ms
14,952 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll n,r,u[2d5];
vector<ll>v[2d5];
ll f(ll j,ll p){
	ll a=1;
	for(ll x:v[j])a&=x-p?f(x,j):1;
	r+=a;
	return!a;
}

{
	rd(n,u(n*2-2));
	rep(i,n*2-2)v[u[i]].push_back(u[i^1]);
	f(1,1);
	wt(r);
}
0