結果

問題 No.706 多眼生物の調査
ユーザー chacoder1
提出日時 2021-01-10 10:40:15
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
WA  
実行時間 -
コード長 332 bytes
コンパイル時間 1,922 ms
コンパイル使用メモリ 198,392 KB
最終ジャッジ日時 2025-01-17 15:53:46
ジャッジサーバーID
(参考情報)
judge4 / judge1
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2 WA * 1
other AC * 2 WA * 3
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main(){
  int n;
  cin>>n;
  map<int,int>mp;
  string s;
  for(int i=0;i<n;i++){
    cin>>s;
    mp[s.length()]++;
  }
  int maxdata=0;
  int ans=0;
  for(auto e:mp){
    if(maxdata<e.second){
      maxdata=e.second;
      ans=e.first-2;
    }
  }
  cout<<ans<<endl;
  return 0;
}
0