結果
| 問題 | No.706 多眼生物の調査 | 
| コンテスト | |
| ユーザー |  ngtkana | 
| 提出日時 | 2020-02-27 12:41:52 | 
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                WA
                                 
                             | 
| 実行時間 | - | 
| コード長 | 364 bytes | 
| コンパイル時間 | 1,521 ms | 
| コンパイル使用メモリ | 168,240 KB | 
| 実行使用メモリ | 6,820 KB | 
| 最終ジャッジ日時 | 2024-10-13 15:51:34 | 
| 合計ジャッジ時間 | 1,895 ms | 
| ジャッジサーバーID (参考情報) | judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 2 WA * 1 | 
| other | AC * 2 WA * 3 | 
ソースコード
#include<bits/stdc++.h>
int main(){
    int n;std::cin>>n;
    std::vector<int>a(1001);
    for(int i=0;i<n;i++){
        std::string s;std::cin>>s;
        a.at(s.length())++;
    }
    int ans=0;
    int max=0;
    for(int i=0;i<=1000;i++){
        if(max<a.at(i)){
            max=a.at(i);
            ans=i-2;
        }
    }
    std::cout<<ans<<std::endl;
}
            
            
            
        