結果
| 問題 |
No.351 市松スライドパズル
|
| コンテスト | |
| ユーザー |
mizuyoukannKB
|
| 提出日時 | 2016-04-03 18:27:36 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 524 bytes |
| コンパイル時間 | 536 ms |
| コンパイル使用メモリ | 56,492 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-10-02 12:39:26 |
| 合計ジャッジ時間 | 3,335 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 WA * 1 |
| other | AC * 11 WA * 6 |
ソースコード
#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;
}
mizuyoukannKB