結果
| 問題 |
No.706 多眼生物の調査
|
| コンテスト | |
| ユーザー |
|
| 提出日時 | 2025-09-24 00:50:20 |
| 言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
| 結果 |
AC
|
| 実行時間 | 2 ms / 2,000 ms |
| コード長 | 535 bytes |
| コンパイル時間 | 1,624 ms |
| コンパイル使用メモリ | 194,876 KB |
| 実行使用メモリ | 7,716 KB |
| 最終ジャッジ日時 | 2025-09-24 00:50:23 |
| 合計ジャッジ時間 | 2,597 ms |
|
ジャッジサーバーID (参考情報) |
judge3 / judge5 |
(要ログイン)
| ファイルパターン | 結果 |
|---|---|
| sample | AC * 3 |
| other | AC * 5 |
ソースコード
#include <bits/stdc++.h>
using namespace std;
int cnt[1001];
int main(void)
{
cin.tie(0);
ios::sync_with_stdio(false);
int n;
string s;
int res = 0;
int Max = 0;
cin >> n;
for(int i=0;i<n;i++)
{
cin >> s;
int m = s.length();
m-=2;
cnt[m]+=1;
if(Max == cnt[m])
{
res = max(res,m);
}
else if(Max < cnt[m])
{
Max = cnt[m];
res = m;
}
}
cout << res << '\n';
return 0;
}