結果

問題 No.351 市松スライドパズル
ユーザー 👑 tatt61880tatt61880
提出日時 2021-03-13 11:55:15
言語 Kuin
(KuinC++ v.2021.9.17)
結果
AC  
実行時間 394 ms / 2,000 ms
コード長 606 bytes
コンパイル時間 5,104 ms
コンパイル使用メモリ 145,204 KB
実行使用メモリ 13,436 KB
最終ジャッジ日時 2023-10-14 17:38:31
合計ジャッジ時間 8,571 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 297 ms
13,260 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 2 ms
4,352 KB
testcase_04 AC 2 ms
4,352 KB
testcase_05 AC 2 ms
4,348 KB
testcase_06 AC 2 ms
4,348 KB
testcase_07 AC 2 ms
4,348 KB
testcase_08 AC 2 ms
4,348 KB
testcase_09 AC 2 ms
4,352 KB
testcase_10 AC 2 ms
4,348 KB
testcase_11 AC 2 ms
4,348 KB
testcase_12 AC 2 ms
4,348 KB
testcase_13 AC 384 ms
13,120 KB
testcase_14 AC 388 ms
13,100 KB
testcase_15 AC 394 ms
13,204 KB
testcase_16 AC 394 ms
13,300 KB
testcase_17 AC 388 ms
13,240 KB
testcase_18 AC 386 ms
13,180 KB
testcase_19 AC 392 ms
13,304 KB
testcase_20 AC 392 ms
13,436 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

func main()
	var h: int :: cui@inputInt()
	var w: int :: cui@inputInt()
	var n: int :: cui@inputInt()
	var s: []char :: #[n]char
	var k: []int :: #[n]int
	for i(0, n - 1)
		do s[i] :: cui@inputChar()
		do k[i] :: cui@inputInt()
	end for
	var x: int :: 0
	var y: int :: 0
	for i(n - 1, 0, -1)
		if(s[i] = 'R')
			if(k[i] = y)
				if(x = 0)
					do x :: w - 1
				else
					do x :- 1
				end if
			end if
		else
			if(k[i] = x)
				if(y = 0)
					do y :: h - 1
				else
					do y :- 1
				end if
			end if
		end if
	end for
	var ans: bool :: x % 2 = y % 2
	do cui@print(ans ?("white\n", "black\n"))
end func
0