結果

問題 No.88 次はどっちだ
ユーザー mannshi222
提出日時 2022-04-29 13:02:13
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 9 ms / 5,000 ms
コード長 397 bytes
コンパイル時間 522 ms
コンパイル使用メモリ 70,224 KB
最終ジャッジ日時 2025-01-28 22:17:18
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
other AC * 11
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>

using namespace std;

int main()
{
	string sente;
	string gote;
	cin >> sente;
	if( sente == "oda" ) {
		gote = "yukiko";
	}
	else {
		gote = "oda";
	}

	int cnt = 0;
	char B[8+1];
	for( int i = 0; i < 8; i++ ) {
		cin >> B;
		for( int j = 0; j < 8; j++ ) {
			if( B[j] == 'b' || B[j] == 'w' ) {
				cnt++;
			}
		}
	}
	cout << ((cnt-4)%2==0?sente:gote) << endl;

	return 0;
}
0