結果

問題 No.351 市松スライドパズル
ユーザー mizuyoukannKBmizuyoukannKB
提出日時 2016-04-03 18:27:36
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 524 bytes
コンパイル時間 630 ms
コンパイル使用メモリ 57,628 KB
実行使用メモリ 6,948 KB
最終ジャッジ日時 2024-04-10 10:48:46
合計ジャッジ時間 3,589 ms
ジャッジサーバーID
(参考情報)
judge1 / judge2
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 122 ms
6,812 KB
testcase_01 AC 2 ms
6,940 KB
testcase_02 AC 1 ms
6,940 KB
testcase_03 WA -
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 1 ms
6,940 KB
testcase_06 AC 1 ms
6,940 KB
testcase_07 WA -
testcase_08 AC 2 ms
6,944 KB
testcase_09 AC 2 ms
6,940 KB
testcase_10 AC 2 ms
6,944 KB
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 AC 158 ms
6,940 KB
testcase_15 WA -
testcase_16 AC 158 ms
6,944 KB
testcase_17 AC 158 ms
6,944 KB
testcase_18 AC 158 ms
6,940 KB
testcase_19 AC 157 ms
6,944 KB
testcase_20 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <string>
#include <iostream>

using namespace std;

int main()
{
	ios::sync_with_stdio(false);
	cin.tie(0);

	int h, w;						//不要なワーク
	int input;						//入力
	bool rBit = true, cBit = true;	//Rbit, Cbit
	string str;						//文字列

	cin >> h >> w;
	cin >> input;

	while(input)
	{
		cin >> str >> h;

		str += to_string(h);

		if(str == "R0")
		{
			rBit = !rBit;
		}

		if(str == "C0")
		{
			cBit = !cBit;
		}

		--input;
	}

	cout << ((rBit ^ cBit) ? ("black") : ("white")) << endl;

	return 0;
}
0