結果

問題 No.2316 Freight Train
ユーザー tailstails
提出日時 2023-05-26 21:39:53
言語 cLay
(20240104-1)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 151 bytes
コンパイル時間 3,674 ms
コンパイル使用メモリ 161,064 KB
実行使用メモリ 6,064 KB
最終ジャッジ日時 2023-08-26 10:49:14
合計ジャッジ時間 6,941 ms
ジャッジサーバーID
(参考情報)
judge12 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,384 KB
testcase_01 AC 2 ms
4,384 KB
testcase_02 AC 1 ms
4,384 KB
testcase_03 AC 26 ms
5,912 KB
testcase_04 AC 12 ms
5,128 KB
testcase_05 AC 11 ms
5,080 KB
testcase_06 AC 3 ms
4,380 KB
testcase_07 AC 15 ms
5,480 KB
testcase_08 AC 19 ms
5,496 KB
testcase_09 AC 18 ms
5,392 KB
testcase_10 AC 15 ms
5,364 KB
testcase_11 AC 18 ms
5,660 KB
testcase_12 AC 21 ms
5,712 KB
testcase_13 AC 25 ms
5,872 KB
testcase_14 AC 25 ms
5,888 KB
testcase_15 AC 25 ms
5,836 KB
testcase_16 AC 27 ms
5,848 KB
testcase_17 AC 26 ms
5,960 KB
testcase_18 AC 27 ms
5,832 KB
testcase_19 AC 27 ms
6,000 KB
testcase_20 AC 27 ms
5,880 KB
testcase_21 AC 27 ms
5,848 KB
testcase_22 AC 26 ms
5,900 KB
testcase_23 AC 12 ms
6,064 KB
testcase_24 AC 16 ms
6,020 KB
testcase_25 AC 14 ms
5,804 KB
testcase_26 AC 13 ms
6,064 KB
testcase_27 AC 6 ms
5,008 KB
testcase_28 AC 1 ms
4,384 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

ll@n,@q;
unionFind u('m',n+1,1);
rep(i,n){
	ll@p;
	if(p>=0)u(i+1,p);
}
rep(q){
	ll@a,@b;
//	wt(u(a)-u(b)?"No":"Yes");
	wt(if[u(a)-u(b),"No","Yes"]);
}
0