結果

問題 No.43 野球の試合
ユーザー nak3nak3
提出日時 2017-03-12 12:12:56
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 586 bytes
コンパイル時間 3,151 ms
コンパイル使用メモリ 151,080 KB
実行使用メモリ 4,504 KB
最終ジャッジ日時 2023-09-12 11:52:27
合計ジャッジ時間 3,515 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 1 ms
4,376 KB
testcase_03 AC 2 ms
4,380 KB
testcase_04 AC 1 ms
4,380 KB
testcase_05 AC 2 ms
4,376 KB
testcase_06 WA -
testcase_07 AC 2 ms
4,376 KB
testcase_08 WA -
testcase_09 AC 2 ms
4,376 KB
testcase_10 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>

using namespace std;

#define INF 2000000000
#define MOD 1000000007
typedef long long ll;
typedef pair<int, int> P;


int main()
{
	int n;
	cin >> n;
	vector<string> s(n);
	vector<int> a(n);

	for (int i = 0; i < n; i++) {
		cin >> s[i];
	}

	for (int i = 0; i < n; i++) {
		for (int j = 0; j < s.size(); j++) {
			if (s[i][j]=='o') {
				a[i]++;
			} else if (s[i][j]=='-'&&i==0) {
				a[i]++;
			}
		}
	}
	int num = a[0];
	sort(a.begin(),a.end());
	int ret = upper_bound(a.begin(), a.end(),num)-a.begin();
	ret = a.size() - ret + 1;
	cout << ret << endl;

}
0