結果

問題 No.706 多眼生物の調査
ユーザー es__135es__135
提出日時 2018-06-30 00:00:42
言語 C++11
(gcc 11.4.0)
結果
AC  
実行時間 10 ms / 2,000 ms
コード長 389 bytes
コンパイル時間 1,137 ms
コンパイル使用メモリ 144,952 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-09-13 15:52:07
合計ジャッジ時間 1,764 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ(β)

テストケース

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

ソースコード

diff #

#include<bits/stdc++.h>
using namespace std;
int main(){
  int n;cin>>n;
  vector<int>count(1005);
  int ans=0;int c_ans=0;
  for(int i=0;i<n;++i){
    string s;cin>>s;
    int num=0;
    for(int j=0;j<s.size();++j){
      if(s[j]=='^')num++;
    }
    count[num]++;
  }
  for(int i=0;i<1006;i++){
    if(c_ans<=count[i]){
      c_ans=count[i];
      ans=i;
    }
  }
  cout<<ans<<endl;
}
0