結果

問題 No.351 市松スライドパズル
ユーザー tailstails
提出日時 2016-03-11 22:51:35
言語 Perl
(5.38.2)
結果
AC  
実行時間 714 ms / 2,000 ms
コード長 145 bytes
コンパイル時間 793 ms
コンパイル使用メモリ 6,124 KB
実行使用メモリ 154,244 KB
最終ジャッジ日時 2023-10-25 07:09:21
合計ジャッジ時間 8,787 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 714 ms
154,244 KB
testcase_01 AC 7 ms
6,212 KB
testcase_02 AC 8 ms
6,208 KB
testcase_03 AC 7 ms
6,212 KB
testcase_04 AC 7 ms
6,212 KB
testcase_05 AC 8 ms
6,212 KB
testcase_06 AC 7 ms
6,208 KB
testcase_07 AC 7 ms
6,212 KB
testcase_08 AC 7 ms
6,212 KB
testcase_09 AC 8 ms
6,212 KB
testcase_10 AC 7 ms
6,212 KB
testcase_11 AC 7 ms
6,212 KB
testcase_12 AC 7 ms
6,208 KB
testcase_13 AC 641 ms
150,876 KB
testcase_14 AC 647 ms
151,728 KB
testcase_15 AC 660 ms
154,168 KB
testcase_16 AC 663 ms
154,232 KB
testcase_17 AC 639 ms
154,228 KB
testcase_18 AC 694 ms
154,232 KB
testcase_19 AC 650 ms
154,232 KB
testcase_20 AC 645 ms
154,232 KB
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "black" may clash with future reserved word at Main.pl line 11.
Unquoted string "white" may clash with future reserved word at Main.pl line 11.
Name "main::n" used only once: possible typo at Main.pl line 2.
Main.pl syntax OK

ソースコード

diff #

($h,$w)=glob<>;
$n=<>;
for(reverse<>){
	if(/C/){
		$y=($y-1)%$h if $x==$';
	}else{
		/ /;
		$x=($x-1)%$w if $y==$';
	}
}
print$x+$y&1?black:white
0