結果
問題 | No.88 次はどっちだ |
ユーザー |
![]() |
提出日時 | 2015-09-02 00:14:47 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 508 bytes |
コンパイル時間 | 544 ms |
コンパイル使用メモリ | 58,076 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-18 17:33:08 |
合計ジャッジ時間 | 877 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include<iostream>#include<string>#include<algorithm>int main() {std::string first_player;std::cin >> first_player;int black = 0, white = 0;std::string area;for (int i = 0; i < 8; i++) {std::cin >> area;black += std::count(area.begin(), area.end(), 'b');white += std::count(area.begin(), area.end(), 'w');}if ((black + white) % 2 == 0) {std::cout << first_player << std::endl;} else {std::cout << (first_player == "oda" ? "yukiko" : "oda") << std::endl;}return 0;}