結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 723 ms
6,816 KB
testcase_01 WA -
testcase_02 AC 1 ms
6,944 KB
testcase_03 AC 2 ms
6,940 KB
testcase_04 AC 2 ms
6,940 KB
testcase_05 AC 2 ms
6,940 KB
testcase_06 AC 2 ms
6,940 KB
testcase_07 WA -
testcase_08 AC 2 ms
6,940 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 WA -
testcase_13 WA -
testcase_14 WA -
testcase_15 AC 730 ms
6,940 KB
testcase_16 WA -
testcase_17 WA -
testcase_18 AC 753 ms
6,940 KB
testcase_19 WA -
testcase_20 WA -
権限があれば一括ダウンロードができます
コンパイルメッセージ
main.cpp: In function ‘int main()’:
main.cpp:13:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   13 |         scanf("%d %d", &input, &input);
      |         ~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~
main.cpp:14:14: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   14 |         scanf("%d", &input);
      |         ~~~~~^~~~~~~~~~~~~~
main.cpp:19:22: warning: ignoring return value of ‘int scanf(const char*, ...)’ declared with attribute ‘warn_unused_result’ [-Wunused-result]
   19 |                 scanf("%s", str);
      |                 ~~~~~^~~~~~~~~~~

ソースコード

diff #

#include <string.h>
#include <iostream>

using namespace std;

int main()
{
	int input;						//入力
	bool rBit = true, cBit = true;	//Rbit, Cbit
	char str[10];					//文字

	//入力(回数だけ重要)
	scanf("%d %d", &input, &input);
	scanf("%d", &input);
	rewind(stdin);

	while(input)
	{
		scanf("%s", str);
		rewind(stdin);

		if(!(strstr("R 0", str)))
		{
			rBit ^= 1;
		}

		if(!(strstr("C 0", str)))
		{
			cBit ^= 1;
		}

		--input;
	}

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

	return 0;
}
0