結果
問題 |
No.706 多眼生物の調査
|
ユーザー |
![]() |
提出日時 | 2023-08-21 09:09:03 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 449 bytes |
コンパイル時間 | 936 ms |
コンパイル使用メモリ | 94,016 KB |
最終ジャッジ日時 | 2025-02-16 12:00:16 |
ジャッジサーバーID (参考情報) |
judge5 / judge1 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include<iostream> #include<map> #include<vector> #include <algorithm> #include<math.h> using namespace std; int main() { int n, max1 = -1, ans = -1; cin >> n; vector<int> v(1000, 0); for (int i = 0; i < n; i++){ string s; cin >> s; v[s.size()-2]++; } for (int i = 0; i < 1000; i++){ if(v[i] >= max1){ max1 = v[i]; ans = i; } } cout << ans << endl; }