結果

問題 No.706 多眼生物の調査
ユーザー ilplrrilplrr
提出日時 2018-06-30 17:01:51
言語 C++11
(gcc 11.4.0)
結果
WA  
実行時間 -
コード長 453 bytes
コンパイル時間 1,345 ms
コンパイル使用メモリ 144,576 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 16:20:48
合計ジャッジ時間 1,895 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;

int main()
{
    int n;
    cin >> n;

    string s;
    int c[1010] = {};
    int ma = 0, ans = 0;
    for (int i = 0; i < n; i++) {
        cin >> s;
        int t = 0;
        for (auto x : s) {
            if (x != '^') continue;
            t++;
        }
        c[t]++;
        if (c[t] >= ma) {
            ma = c[t];
            ans = t;
        }
    }

    cout << ans << endl;

    return 0;
}
0