結果

問題 No.351 市松スライドパズル
コンテスト
ユーザー %20
提出日時 2018-05-28 17:34:26
言語 Perl
(5.42.0)
コンパイル:
perl -cw _filename_
実行:
perl -X _filename_
結果
AC  
実行時間 605 ms / 2,000 ms
コード長 173 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 299 ms
コンパイル使用メモリ 6,144 KB
実行使用メモリ 154,240 KB
最終ジャッジ日時 2026-03-20 02:30:54
合計ジャッジ時間 7,561 ms
ジャッジサーバーID
(参考情報)
judge2_0 / judge1_0
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 4
other AC * 17
権限があれば一括ダウンロードができます
コンパイルメッセージ
Unquoted string "black" may clash with future reserved word at Main.pl line 15.
Unquoted string "white" may clash with future reserved word at Main.pl line 15.
Main.pl syntax OK

ソースコード

diff #
raw source code

($H,$W)=glob<>;
<>;
for(reverse<>){
	($S,$K)=split;
	if($S eq'R'){
		if($K==$y){
			$x=($x-1)%$W
		}
	}else{
		if($K==$x){
			$y=($y-1)%$H
		}
	}
}
print$x+$y&1?black:white
0