結果

問題 No.1908 Assault for Keys
ユーザー 杨娵隅
提出日時 2022-04-23 01:05:21
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 5 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 1,972 ms
コンパイル使用メモリ 195,408 KB
最終ジャッジ日時 2025-01-28 20:51:58
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
#define int long long
constexpr int inf = 1e18;
constexpr int maxn = 2e5 + 5;
constexpr int mod = 998244353;

inline void solve()
{
  int n, m; cin >> n >> m;
  vector<string> s(n);
  for (auto &x : s) cin >> x;
  int mx = 0;
  for (int i = 0; i < m; i ++)
  {
    int cnt = 0;
    for (int j = 0; j < n; j ++) cnt += (s[j][i] == 'x');
    mx = max(mx, cnt);
  }
  cout << mx + 1 << "\n";
}

signed main()
{
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  solve();
  return 0;
}
/*
The details you should care:

*/
0