結果

問題 No.92 逃走経路
ユーザー %20%20
提出日時 2018-01-12 03:26:17
言語 Perl
(5.38.2)
結果
AC  
実行時間 465 ms / 5,000 ms
コード長 206 bytes
コンパイル時間 542 ms
コンパイル使用メモリ 7,168 KB
実行使用メモリ 10,456 KB
最終ジャッジ日時 2023-08-25 11:13:22
合計ジャッジ時間 3,661 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 54 ms
10,456 KB
testcase_01 AC 6 ms
5,212 KB
testcase_02 AC 6 ms
5,168 KB
testcase_03 AC 6 ms
5,188 KB
testcase_04 AC 6 ms
5,184 KB
testcase_05 AC 456 ms
6,140 KB
testcase_06 AC 12 ms
6,644 KB
testcase_07 AC 13 ms
6,760 KB
testcase_08 AC 9 ms
6,188 KB
testcase_09 AC 42 ms
8,776 KB
testcase_10 AC 462 ms
7,488 KB
testcase_11 AC 425 ms
8,036 KB
testcase_12 AC 465 ms
9,192 KB
testcase_13 AC 28 ms
7,336 KB
testcase_14 AC 51 ms
9,440 KB
testcase_15 AC 58 ms
9,420 KB
testcase_16 AC 57 ms
10,036 KB
testcase_17 AC 58 ms
10,132 KB
testcase_18 AC 34 ms
7,796 KB
testcase_19 AC 23 ms
6,992 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Name "main::M" used only once: possible typo at Main.pl line 1.
Main.pl syntax OK

ソースコード

diff #

($N,$M,$K)=glob<>;
@_=<>;
@d=glob pop@_;
/ .* /,push@{$'+0},[$`,$&],[$&,$`]for@_;
@g=[0,(1)x$N];
for(@d){
	for(@$_){
		$g[$i+1][@$_[1]]|=$g[$i][@$_[0]]
	}
	++$i
}
@g=grep@{$g[$K]}[$_],1..$N;
print@g."\n@g"
0