結果
問題 |
No.88 次はどっちだ
|
ユーザー |
![]() |
提出日時 | 2020-07-19 03:49:19 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 2 ms / 5,000 ms |
コード長 | 475 bytes |
コンパイル時間 | 1,652 ms |
コンパイル使用メモリ | 169,108 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-12-15 06:48:11 |
合計ジャッジ時間 | 2,276 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
other | AC * 11 |
ソースコード
#include <bits/stdc++.h> #define PI 3.14159265359 using namespace std; const int64_t mod = 1e9 + 7; int main() { string S,T; cin >> S; if (S == "oda") T = "yukiko"; else T = "oda"; int b, w; b = 0; w = 0; for (int i = 0; i < 8; i++) { string s; cin >> s; b += count(s.begin(), s.end(), 'b'); w += count(s.begin(), s.end(), 'w'); } //cout << b + w << endl; int sum = b + w; if (sum % 2 == 0) { cout << S << endl; } else { cout << T << endl; } }