結果

問題 No.228 ゆきこちゃんの 15 パズル
ユーザー tailstails
提出日時 2015-06-20 00:26:21
言語 Perl
(5.38.2)
結果
AC  
実行時間 3 ms / 5,000 ms
コード長 196 bytes
コンパイル時間 43 ms
コンパイル使用メモリ 5,220 KB
実行使用メモリ 4,892 KB
最終ジャッジ日時 2023-09-21 10:24:24
合計ジャッジ時間 934 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,620 KB
testcase_01 AC 2 ms
4,564 KB
testcase_02 AC 2 ms
4,856 KB
testcase_03 AC 2 ms
4,532 KB
testcase_04 AC 2 ms
4,844 KB
testcase_05 AC 3 ms
4,692 KB
testcase_06 AC 2 ms
4,848 KB
testcase_07 AC 2 ms
4,668 KB
testcase_08 AC 2 ms
4,892 KB
testcase_09 AC 2 ms
4,664 KB
testcase_10 AC 2 ms
4,672 KB
testcase_11 AC 2 ms
4,740 KB
testcase_12 AC 2 ms
4,852 KB
testcase_13 AC 2 ms
4,620 KB
testcase_14 AC 2 ms
4,676 KB
testcase_15 AC 2 ms
4,616 KB
testcase_16 AC 2 ms
4,624 KB
testcase_17 AC 2 ms
4,724 KB
testcase_18 AC 2 ms
4,672 KB
testcase_19 AC 2 ms
4,560 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "a" may clash with future reserved word at Main.pl line 2.
Main.pl syntax OK

ソースコード

diff #

sub f{$a[$x=$z+"@_"]-$z-1or$a[$z]=$z+1,$z=$x}
$/=a;@a=<>=~/\d+/g;
($z)=grep!$a[$_],0..15;
$z>3&&f(-4),$z<12&&f(4),$z%4&&f(-1),$z%4<3&&f(1)for 0..15;
$a[$z]=16;
print grep($a[$_]-$_-1,0..15)?No:Yes
0