結果

問題 No.706 多眼生物の調査
コンテスト
ユーザー nabla_delta
提出日時 2019-09-30 18:50:35
言語 C++14
(gcc 15.2.0 + boost 1.89.0)
コンパイル:
g++-15 -O2 -lm -std=c++14 -Wuninitialized -DONLINE_JUDGE -o a.out _filename_
実行:
./a.out
結果
AC  
実行時間 7 ms / 2,000 ms
コード長 356 bytes
記録
記録タグの例:
初AC ショートコード 純ショートコード 純主流ショートコード 最速実行時間
コンパイル時間 1,547 ms
コンパイル使用メモリ 181,312 KB
実行使用メモリ 7,972 KB
最終ジャッジ日時 2026-04-19 07:06:48
合計ジャッジ時間 1,751 ms
ジャッジサーバーID
(参考情報)
judge2_1 / judge1_1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #
raw source code

#include <bits/stdc++.h>

using namespace std;

typedef unsigned long long ull;
typedef long long ll;

int main(){
	vector<int> cnt(1000, 0);
	int n;
	cin >> n;
	for(int i=0; i<n; i++){
		string s;
		cin >> s;
		cnt[s.length()-2]++;
	}
	int m=0, a=0;
	for(int i=0; i<1000; i++){
		if(m<=cnt[i]){
			m=cnt[i];
			a=i;
		}
	}
	cout << a << endl;
	return 0;
}
0