結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2018-07-10 19:21:04 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 722 bytes |
コンパイル時間 | 899 ms |
コンパイル使用メモリ | 99,196 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-09-13 15:02:29 |
合計ジャッジ時間 | 1,511 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge4 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <cmath> #include <iostream> #include <vector> #include <queue> #include <deque> #include <map> #include <set> #include <stack> #include <tuple> #include <bitset> #include <algorithm> #include <functional> #include <utility> #include <iomanip> #define int long long int #define rep(i, n) for(int i = 0; i < (n); ++i) using namespace std; typedef pair<int, int> P; const int INF = 1e15; const int MOD = 1e9+7; signed main(){ int n; cin >> n; vector<int> len(1010); rep(i, n){ string s; cin >> s; len[s.size()]++; } int max = 0; rep(i, 1011){ if(len[max] <= len[i]){ max = i; } } cout << max-2 << endl; return 0; }