結果

問題 No.583 鉄道同好会
ユーザー tails
提出日時 2017-10-27 23:58:35
言語 Perl
(5.40.0)
結果
AC  
実行時間 373 ms / 2,000 ms
コード長 208 bytes
コンパイル時間 511 ms
コンパイル使用メモリ 5,504 KB
実行使用メモリ 28,928 KB
最終ジャッジ日時 2024-11-21 23:45:48
合計ジャッジ時間 2,637 ms
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 16
権限があれば一括ダウンロードができます
コンパイルメッセージ
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 #

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