結果

問題 No.583 鉄道同好会
コンテスト
ユーザー 👑 tails
提出日時 2017-10-27 23:58:35
言語 Perl
(5.42.1)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 242 ms / 2,000 ms
コード長 208 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 223 ms
コンパイル使用メモリ 6,656 KB
実行使用メモリ 28,032 KB
最終ジャッジ日時 2026-05-16 03:47:10
合計ジャッジ時間 2,148 ms
ジャッジサーバーID
(参考情報)
judge3_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
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 #
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