結果
| 問題 | 
                            No.706 多眼生物の調査
                             | 
                    
| コンテスト | |
| ユーザー | 
                             | 
                    
| 提出日時 | 2018-06-30 17:01:51 | 
| 言語 | C++11(廃止可能性あり)  (gcc 13.3.0)  | 
                    
| 結果 | 
                             
                                WA
                                 
                             
                            
                         | 
                    
| 実行時間 | - | 
| コード長 | 453 bytes | 
| コンパイル時間 | 1,391 ms | 
| コンパイル使用メモリ | 160,252 KB | 
| 実行使用メモリ | 6,944 KB | 
| 最終ジャッジ日時 | 2024-07-01 00:57:58 | 
| 合計ジャッジ時間 | 1,930 ms | 
| 
                            ジャッジサーバーID (参考情報)  | 
                        judge5 / judge4 | 
(要ログイン)
| ファイルパターン | 結果 | 
|---|---|
| sample | AC * 3 | 
| other | AC * 4 WA * 1 | 
ソースコード
#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;
}