結果

問題 No.583 鉄道同好会
コンテスト
ユーザー 👑 tails
提出日時 2017-10-27 23:58:35
言語 Perl
(5.44.0)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 273 ms / 2,000 ms
+ 528µs
コード長 208 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 6 ms
コンパイル使用メモリ 9,736 KB
実行使用メモリ 28,032 KB
最終ジャッジ日時 2026-10-14 18:57:29
合計ジャッジ時間 2,908 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge4_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 15
権限があれば一括ダウンロードができます
コンパイルメッセージ
Useless use of a variable in void context at Main.pl line 4.
Possible precedence problem on bitwise | operator at Main.pl line 13.
Main.pl syntax OK

ソースコード

diff #
raw source code

sub f{
	my$e=$e[$_];
	$_||${$_=1;vec($e,$_,1)&&f()for@n}for vec$g,$_,1
}
@n=0..<>;
map{
	/ /;
	$d[$`]^=vec($e[$`],$',1)=1;
	$d[$']^=vec($e[$'],$`,1)=1;
	f;
}<>;
$h|=$_ for@e;
print$g ne$h|grep($_,@d)>2?NO:YES
0