結果
問題 | No.88 次はどっちだ |
ユーザー |
|
提出日時 | 2015-06-01 20:14:02 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 534 bytes |
コンパイル時間 | 375 ms |
コンパイル使用メモリ | 58,460 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-07-06 13:16:39 |
合計ジャッジ時間 | 875 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <iostream>#include <algorithm>using namespace std;int main() {auto te = {"oda", "yukiko"};string s;cin >> s;int countw = 0;int countb = 0;string b;for (int i = 0; i < 8; ++i) {cin >> b;countw += count(b.begin(), b.end(), 'w');countb += count(b.begin(), b.end(), 'b');}if ((countw - countb) % 2) {if (s == "oda") cout << "yukiko" << endl;else cout << "oda" << endl;} else {cout << s << endl;}return 0;}