結果
問題 |
No.706 多眼生物の調査
|
ユーザー |
|
提出日時 | 2018-08-11 22:29:58 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 447 bytes |
コンパイル時間 | 1,780 ms |
コンパイル使用メモリ | 167,660 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-23 06:34:00 |
合計ジャッジ時間 | 2,339 ms |
ジャッジサーバーID (参考情報) |
judge4 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h> using namespace std; // yukicoder no.706 int main() { vector<int> freq(1000, 0); int N; cin >> N; while (N--){ string S; cin >> S; ++freq[S.size() - 2]; } int ans = 0; int maxFreq = 0; for (int i = 0; i < freq.size(); ++i){ if (maxFreq <= freq[i]){ ans = i; maxFreq = freq[i]; } } cout << ans << endl; return 0; }