結果

問題 No.1588 Connection
ユーザー tailstails
提出日時 2021-07-09 16:12:58
言語 Perl
(5.38.2)
結果
AC  
実行時間 123 ms / 2,000 ms
コード長 255 bytes
コンパイル時間 276 ms
コンパイル使用メモリ 5,216 KB
実行使用メモリ 24,336 KB
平均クエリ数 564.00
最終ジャッジ日時 2023-09-24 12:02:27
合計ジャッジ時間 3,744 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 32 ms
23,244 KB
testcase_01 AC 28 ms
24,336 KB
testcase_02 AC 28 ms
23,364 KB
testcase_03 AC 27 ms
24,084 KB
testcase_04 AC 28 ms
23,568 KB
testcase_05 AC 28 ms
24,036 KB
testcase_06 AC 28 ms
23,688 KB
testcase_07 AC 28 ms
24,156 KB
testcase_08 AC 31 ms
24,084 KB
testcase_09 AC 31 ms
24,168 KB
testcase_10 AC 31 ms
23,868 KB
testcase_11 AC 31 ms
24,024 KB
testcase_12 AC 65 ms
23,880 KB
testcase_13 AC 72 ms
23,664 KB
testcase_14 AC 29 ms
23,892 KB
testcase_15 AC 28 ms
23,364 KB
testcase_16 AC 29 ms
23,856 KB
testcase_17 AC 28 ms
23,364 KB
testcase_18 AC 28 ms
23,196 KB
testcase_19 AC 28 ms
23,664 KB
testcase_20 AC 29 ms
23,856 KB
testcase_21 AC 117 ms
23,664 KB
testcase_22 AC 119 ms
23,364 KB
testcase_23 AC 63 ms
23,424 KB
testcase_24 AC 48 ms
23,952 KB
testcase_25 AC 75 ms
23,568 KB
testcase_26 AC 72 ms
23,868 KB
testcase_27 AC 46 ms
23,436 KB
testcase_28 AC 42 ms
23,208 KB
testcase_29 AC 122 ms
23,424 KB
testcase_30 AC 123 ms
23,664 KB
testcase_31 AC 28 ms
24,168 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Possible precedence problem on bitwise & operator at Main.pl line 3.
Possible precedence problem on bitwise & operator at Main.pl line 3.
Possible precedence problem on bitwise & operator at Main.pl line 3.
Main.pl syntax OK

ソースコード

diff #

sub enq{
	my($y,$x)=@_;
	if($y>0&$y<=$n&$x>0&$x<=$n&&!$$y[$x]++){
		print"$y $x\n";
		push@s,[$y,$x]if<>=~B;
	}
}
$|=1;
$n+=<>;
enq(1,1);
while($_=pop@s){
	($y,$x)=@$_;
	enq($y+1,$x);
	enq($y,$x+1);
	enq($y,$x-1);
	enq($y-1,$x);
}
print$$n[$n]?Yes:No,$/;
0