結果

問題 No.2205 Lights Out on Christmas Tree
ユーザー tailstails
提出日時 2023-02-03 22:44:25
言語 cLay
(20240104-1)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 243 bytes
コンパイル時間 4,199 ms
コンパイル使用メモリ 163,276 KB
実行使用メモリ 26,952 KB
最終ジャッジ日時 2023-09-15 18:54:33
合計ジャッジ時間 5,824 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
5,440 KB
testcase_01 AC 2 ms
5,452 KB
testcase_02 AC 2 ms
5,448 KB
testcase_03 AC 2 ms
5,520 KB
testcase_04 AC 2 ms
5,436 KB
testcase_05 AC 2 ms
5,388 KB
testcase_06 AC 2 ms
5,572 KB
testcase_07 AC 2 ms
5,460 KB
testcase_08 AC 2 ms
5,392 KB
testcase_09 AC 2 ms
5,412 KB
testcase_10 AC 2 ms
5,452 KB
testcase_11 AC 16 ms
14,440 KB
testcase_12 AC 16 ms
14,624 KB
testcase_13 AC 16 ms
14,428 KB
testcase_14 AC 13 ms
14,452 KB
testcase_15 AC 26 ms
26,952 KB
testcase_16 AC 12 ms
11,772 KB
testcase_17 AC 11 ms
11,576 KB
testcase_18 AC 2 ms
5,392 KB
testcase_19 AC 16 ms
14,444 KB
testcase_20 AC 18 ms
14,436 KB
testcase_21 AC 17 ms
14,436 KB
testcase_22 AC 14 ms
14,480 KB
testcase_23 AC 16 ms
14,436 KB
testcase_24 AC 17 ms
14,480 KB
testcase_25 AC 18 ms
14,432 KB
testcase_26 AC 20 ms
14,500 KB
testcase_27 AC 15 ms
14,476 KB
testcase_28 AC 14 ms
14,492 KB
testcase_29 AC 14 ms
14,552 KB
testcase_30 AC 20 ms
14,500 KB
testcase_31 AC 16 ms
14,484 KB
testcase_32 AC 16 ms
14,704 KB
testcase_33 AC 16 ms
14,488 KB
testcase_34 AC 15 ms
14,548 KB
testcase_35 AC 19 ms
14,500 KB
testcase_36 AC 18 ms
14,556 KB
testcase_37 AC 15 ms
14,664 KB
testcase_38 AC 19 ms
14,496 KB
testcase_39 AC 15 ms
14,508 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

int c[2d5],z;
graph g;

int f(int i,int p){
	int r=!c[i];
	rep[g.edge[i]](j,g.es[i]){
		if(j!=p){
			r^=f(j,i);
		}
	}
	z+=r;
	return r;
}

{
	int@n,a[n-1],b[n-1];
	rd((a--,b--)(n-1),c(n));
	g.setEdge(n,n-1,a,b);
	int r=f(0,0);
	wt(r?-1:z);
}
0