結果
| 問題 | No.706 多眼生物の調査 | 
| コンテスト | |
| ユーザー |  kekenx | 
| 提出日時 | 2020-01-26 16:39:14 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 12 ms / 2,000 ms | 
| コード長 | 393 bytes | 
| コンパイル時間 | 1,670 ms | 
| コンパイル使用メモリ | 172,652 KB | 
| 実行使用メモリ | 5,376 KB | 
| 最終ジャッジ日時 | 2024-09-14 11:06:51 | 
| 合計ジャッジ時間 | 2,359 ms | 
| ジャッジサーバーID (参考情報) | judge3 / judge5 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include <bits/stdc++.h>
using namespace std;
int main() {
  int N;
  scanf("%d", &N);
  map<int, int> cnts;
  for (int i = 0; i < N; ++i) {
    string S;
    cin >> S;
    int cnt = S.size() - 2;
    cnts[cnt]++;
  }
  int ma = -1;
  int cnt = -1;
  for (auto e: cnts) {
    if (e.second >= ma) {
      ma = e.second;
      cnt = e.first;
    }
  }
  printf("%d\n", cnt);
  return 0;
}
            
            
            
        