結果

問題 No.706 多眼生物の調査
ユーザー ama_nukoama_nuko
提出日時 2018-07-10 19:21:04
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 722 bytes
コンパイル時間 734 ms
コンパイル使用メモリ 93,880 KB
実行使用メモリ 4,352 KB
最終ジャッジ日時 2023-10-11 16:21:06
合計ジャッジ時間 1,429 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 2 ms
4,348 KB
testcase_03 AC 1 ms
4,348 KB
testcase_04 AC 3 ms
4,352 KB
testcase_05 AC 5 ms
4,348 KB
testcase_06 AC 10 ms
4,348 KB
testcase_07 AC 1 ms
4,352 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#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;
}
0