結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2018-07-25 15:20:33 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 1,678 ms |
コンパイル使用メモリ | 173,520 KB |
実行使用メモリ | 5,376 KB |
最終ジャッジ日時 | 2024-06-26 08:45:05 |
合計ジャッジ時間 | 2,326 ms |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h>#define int long longusing namespace std;signed main(){int n;cin >> n;map<int, int> mp;for(int i = 0; i < n; i++){string s;cin >> s;mp[s.size() - 2]++;}int MAX = 0, ans = 0;for(auto it = mp.begin(); it != mp.end(); it++){if(it -> second >= MAX){MAX = it -> second;ans = it -> first;}}cout << ans << endl;}