結果

問題 No.351 市松スライドパズル
ユーザー tailstails
提出日時 2016-03-11 22:51:35
言語 Perl
(5.40.0)
結果
AC  
実行時間 700 ms / 2,000 ms
コード長 145 bytes
コンパイル時間 290 ms
コンパイル使用メモリ 6,944 KB
実行使用メモリ 153,984 KB
最終ジャッジ日時 2024-09-25 02:29:52
合計ジャッジ時間 8,168 ms
ジャッジサーバーID
(参考情報)
judge3 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
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