結果
問題 | No.88 次はどっちだ |
ユーザー |
![]() |
提出日時 | 2014-12-07 19:06:27 |
言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 689 bytes |
コンパイル時間 | 516 ms |
コンパイル使用メモリ | 62,152 KB |
実行使用メモリ | 6,948 KB |
最終ジャッジ日時 | 2024-06-11 16:06:14 |
合計ジャッジ時間 | 886 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include<cstdio> #include<iostream> #include<vector> #include<algorithm> #include<string> #include<cstring> using namespace std; typedef long long LL; typedef vector<int> VI; #define REP(i,n) for(int i=0; i<int(n); i++) #define EACH(i,c) for(__typeof((c).begin()) i=(c).begin();i!=(c).end();i++) string oda = "oda", yukiko = "yukiko"; string name; int cnt; int main() { cin >> name; REP (i, 8) { string s; cin >> s; cnt += count(s.begin(), s.end(), 'b'); cnt += count(s.begin(), s.end(), 'w'); } if (cnt % 2 == 0) cout << name << endl; else if (name == oda) cout << yukiko << endl; else cout << oda << endl; return 0; }