結果
| 問題 | No.88 次はどっちだ |
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2022-01-11 17:16:08 |
| 言語 | C++23 (gcc 15.3.0 + boost 1.92.0 + ACL) |
| 結果 |
AC
不安定
|
| 実行時間 | 1 ms / 5,000 ms |
| + 312µs | |
| コード長 | 692 bytes |
| 記録 | |
| コンパイル時間 | 955 ms |
| コンパイル使用メモリ | 166,228 KB |
| 実行使用メモリ | 9,864 KB |
| 最終ジャッジ日時 | 2026-09-22 09:08:03 |
| 合計ジャッジ時間 | 2,310 ms |
|
ジャッジサーバーID (参考情報) |
judge4_0 / judge3_0 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| other | AC * 11 |
ソースコード
//No.88 次はどっちだ
#include <iostream>
#include <string>
#include <vector>
using namespace std;
signed main(){
string s; cin >> s;
vector<string> b(8);
int black = 0;
int white = 0;
for( int i = 0 ; i < 8 ; ++i){
cin >> b[i];
for( int j = 0 ; j < 8 ; ++j){
if( b[i][j] == 'b') ++black;
else if( b[i][j] == 'w') ++white;
}
}
if(( black % 2 != 0 && white %2 != 0 ) || ( !(black & 1) && !(white & 1 ))){
if ( s == "oda") cout << s << endl;
else if ( s == "yukiko") cout << s << endl;
} else {
if ( s == "oda" ) cout << "yukiko" << endl;
else cout << "oda" << endl;
}
}