結果
| 問題 | No.706 多眼生物の調査 | 
| コンテスト | |
| ユーザー |  | 
| 提出日時 | 2020-04-09 17:19:21 | 
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) | 
| 結果 | 
                                AC
                                 
                             | 
| 実行時間 | 2 ms / 2,000 ms | 
| コード長 | 510 bytes | 
| コンパイル時間 | 688 ms | 
| コンパイル使用メモリ | 75,116 KB | 
| 最終ジャッジ日時 | 2025-01-09 15:30:56 | 
| ジャッジサーバーID (参考情報) | judge4 / judge2 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 5 | 
ソースコード
#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
void solve() {
    std::vector<int> cnt(1000, 0);
    int n;
    std::cin >> n;
    while (n--) {
        std::string s;
        std::cin >> s;
        ++cnt[s.length() - 2];
    }
    int ans = 0;
    for (int i = 0; i < 1000; ++i) {
        if (cnt[i] >= cnt[ans]) ans = i;
    }
    std::cout << ans << std::endl;
}
int main() {
    std::cin.tie(nullptr);
    std::ios::sync_with_stdio(false);
    solve();
    return 0;
}
            
            
            
        