結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2018-06-29 22:47:00 |
言語 | C++11 (gcc 13.3.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 418 bytes |
コンパイル時間 | 1,337 ms |
コンパイル使用メモリ | 167,108 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-07-01 00:05:13 |
合計ジャッジ時間 | 1,827 ms |
ジャッジサーバーID (参考情報) |
judge1 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h>#define REP(i, a, n) for(ll i = ((ll) a); i < ((ll) n); i++)using namespace std;typedef long long ll;int main(void) {ll N;cin >> N;vector<string> S(N);REP(i, 0, N) cin >> S[i];map<ll, ll> cnt;REP(i, 0, N) cnt[S[i].length() - 2]++;ll x = 0, ans;for(auto p : cnt) {if(x <= p.second) {x = p.second;ans = p.first;}}cout << ans << endl;}