結果
| 問題 | No.706 多眼生物の調査 | 
| コンテスト | |
| ユーザー |  aguroshou | 
| 提出日時 | 2018-06-29 22:34:41 | 
| 言語 | C++11(廃止可能性あり) (gcc 13.3.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 12 ms / 2,000 ms | 
| コード長 | 782 bytes | 
| コンパイル時間 | 676 ms | 
| コンパイル使用メモリ | 66,676 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-06-30 23:58:47 | 
| 合計ジャッジ時間 | 1,152 ms | 
| ジャッジサーバーID (参考情報) | judge4 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include<iostream>
#include <algorithm>
#include<string>
#include <bitset>
#include <vector>
#include <functional>
#include <climits>
using namespace std;
int main()
{
	//int a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, ans = 0;
	long long a = 0, b = 0, c = 0, d = 0, e = 0, f = 0, g = 0, h = 0, i = 0, j = 0, k = 0, l = 0, ans = 0;
	//cout << LONG_MAX << endl;
	string s[1001];
	//long long n, A[1000000000];
	int n;
	cin >> n;
	for ( a = 0; a < n; a++)
	{
		cin >> s[a];
	}
	int num[1001] = {};
	for ( a = 0; a < n; a++)
	{
		c = 0;
		for ( b = 0; b < s[a].length(); b++)
		{
			if (s[a][b]=='^')
			{
				c++;
			}
		}
		num[c]++;
	}
	b = 0;
	c = 0;
	for ( a = 0; a < 1001; a++)
	{
		if (b<=num[a])
		{
			b = num[a];
			c = a;
		}
	}
	cout << c << endl;
	return 0;
}
            
            
            
        