結果
問題 | No.706 多眼生物の調査 |
ユーザー |
![]() |
提出日時 | 2019-12-13 01:58:00 |
言語 | C++14 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 4 ms / 2,000 ms |
コード長 | 470 bytes |
コンパイル時間 | 1,874 ms |
コンパイル使用メモリ | 175,760 KB |
実行使用メモリ | 6,944 KB |
最終ジャッジ日時 | 2024-06-26 03:50:28 |
合計ジャッジ時間 | 2,226 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 3 |
other | AC * 5 |
ソースコード
#include <bits/stdc++.h>#define rep(i,n) for(int i=0;i<(n);++i)#define all(a) (a).begin(),(a).end()using namespace std;typedef long long ll;int main() {ios::sync_with_stdio(false);cin.tie(0);int n; cin >> n;vector<string> S(n);rep(i, n) cin >> S[i];vector<pair<int, int>> ans(1000);rep(i, 1000) {ans[i].second = i;}rep(i, n) {int k = count(all(S[i]),'^');ans[k].first++;}sort(all(ans));cout << ans[999].second << endl;return 0;}