結果

問題 No.706 多眼生物の調査
ユーザー 0w1
提出日時 2018-10-20 23:59:33
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 3 ms / 2,000 ms
コード長 463 bytes
コンパイル時間 1,849 ms
コンパイル使用メモリ 204,696 KB
最終ジャッジ日時 2025-01-06 14:43:48
ジャッジサーバーID
(参考情報)
judge3 / judge2
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 3
other AC * 5
権限があれば一括ダウンロードができます

ソースコード

diff #

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

signed main() {
  ios::sync_with_stdio(false);

  int N;
  cin >> N;

  vector<string> S(N);
  for (int i = 0; i < N; ++i) cin >> S[i];

  map<int, int> cnt;
  for (int i = 0; i < N; ++i) {
    ++cnt[count(S[i].begin(), S[i].end(), '^')];
  }

  map<int, int> cnt2;
  for (auto it = cnt.begin(); it != cnt.end(); ++it) {
    cnt2[it->second] = it->first;
  }

  cout << cnt2.rbegin()->second << endl;

  return 0;
}
0