結果

問題 No.1908 Assault for Keys
ユーザー 杨娵隅杨娵隅
提出日時 2022-04-23 01:05:21
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 6 ms / 2,000 ms
コード長 565 bytes
コンパイル時間 2,523 ms
コンパイル使用メモリ 199,784 KB
実行使用メモリ 4,580 KB
最終ジャッジ日時 2023-09-06 11:59:35
合計ジャッジ時間 3,854 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 5 ms
4,376 KB
testcase_03 AC 5 ms
4,396 KB
testcase_04 AC 5 ms
4,376 KB
testcase_05 AC 5 ms
4,376 KB
testcase_06 AC 5 ms
4,380 KB
testcase_07 AC 5 ms
4,580 KB
testcase_08 AC 5 ms
4,408 KB
testcase_09 AC 5 ms
4,404 KB
testcase_10 AC 6 ms
4,544 KB
testcase_11 AC 5 ms
4,388 KB
testcase_12 AC 5 ms
4,484 KB
testcase_13 AC 5 ms
4,396 KB
testcase_14 AC 5 ms
4,376 KB
testcase_15 AC 5 ms
4,376 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 1 ms
4,376 KB
testcase_18 AC 5 ms
4,380 KB
testcase_19 AC 5 ms
4,456 KB
権限があれば一括ダウンロードができます

ソースコード

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