結果
問題 | No.706 多眼生物の調査 |
ユーザー | kyawashell |
提出日時 | 2018-06-29 22:24:53 |
言語 | C++17 (gcc 13.2.0 + boost 1.83.0) |
結果 |
AC
|
実行時間 | 12 ms / 2,000 ms |
コード長 | 450 bytes |
コンパイル時間 | 534 ms |
コンパイル使用メモリ | 70,052 KB |
実行使用メモリ | 4,380 KB |
最終ジャッジ日時 | 2023-09-13 15:19:58 |
合計ジャッジ時間 | 1,086 ms |
ジャッジサーバーID (参考情報) |
judge14 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 2 ms
4,376 KB |
testcase_01 | AC | 1 ms
4,380 KB |
testcase_02 | AC | 2 ms
4,376 KB |
testcase_03 | AC | 1 ms
4,376 KB |
testcase_04 | AC | 2 ms
4,380 KB |
testcase_05 | AC | 5 ms
4,380 KB |
testcase_06 | AC | 12 ms
4,376 KB |
testcase_07 | AC | 1 ms
4,380 KB |
ソースコード
#include<iostream> #include<string> using namespace std; #define rep(i,n) for(int i=0;i<(n);i++) typedef long long ll; ll n; string s[1010]; ll cou[1010]; int main() { cin >> n; rep(i,n)cin >> s[i]; rep(i,n) { ll sum = 0; for(auto c : s[i]) { if(c == '^')sum++; } cou[sum]++; } ll ans = 0; rep(i,1001) { if(cou[ans] <= cou[i])ans = i; } cout << ans << endl; }