結果
| 問題 |
No.706 多眼生物の調査
|
| コンテスト | |
| ユーザー |
SSRS
|
| 提出日時 | 2020-08-25 07:15:27 |
| 言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 13 ms / 2,000 ms |
| コード長 | 406 bytes |
| コンパイル時間 | 917 ms |
| コンパイル使用メモリ | 80,652 KB |
| 実行使用メモリ | 6,820 KB |
| 最終ジャッジ日時 | 2024-11-06 11:02:20 |
| 合計ジャッジ時間 | 1,640 ms |
|
ジャッジサーバーID (参考情報) |
judge4 / judge3 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <iostream>
#include <string>
#include <vector>
#include <map>
using namespace std;
int main(){
int N;
cin >> N;
vector<string> S(N);
for (int i = 0; i < N; i++){
cin >> S[i];
}
map<int, int> mp;
for (int i = 0; i < N; i++){
mp[S[i].size() - 2]++;
}
int mx = 0;
int ans = 0;
for (auto P : mp){
if (P.second >= mx){
mx = P.second;
ans = P.first;
}
}
cout << ans << endl;
}
SSRS