結果
| 問題 |
No.43 野球の試合
|
| コンテスト | |
| ユーザー |
hotpepsi
|
| 提出日時 | 2015-06-19 00:44:47 |
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) |
| 結果 |
WA
|
| 実行時間 | - |
| コード長 | 603 bytes |
| コンパイル時間 | 497 ms |
| コンパイル使用メモリ | 65,132 KB |
| 実行使用メモリ | 6,944 KB |
| 最終ジャッジ日時 | 2024-07-07 03:48:01 |
| 合計ジャッジ時間 | 995 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 4 |
| other | AC * 4 WA * 3 |
ソースコード
#include <iostream>
#include <algorithm>
#include <sstream>
#include <vector>
using namespace std;
int main(int argc, char *argv[]) {
string s;
getline(cin, s);
stringstream sa(s);
int N;
sa >> N;
string res[6];
int score[6] = {};
int ans = 1;
for (int i = 0; i < N; ++i) {
getline(cin, res[i]);
score[i] = count_if(res[i].begin(), res[i].end(), [](char c) -> bool { return c == 'o'; });
if (i == 0) {
score[i] += count_if(res[i].begin(), res[i].end(), [](char c) -> bool { return c == '-'; });
} else if (score[i] > score[0]) {
++ans;
}
}
cout << ans << endl;
return 0;
}
hotpepsi