結果

問題 No.1908 Assault for Keys
ユーザー SSRSSSRS
提出日時 2022-04-22 21:03:08
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 26 ms / 2,000 ms
コード長 420 bytes
コンパイル時間 2,021 ms
コンパイル使用メモリ 202,460 KB
実行使用メモリ 5,380 KB
最終ジャッジ日時 2023-09-06 07:14:55
合計ジャッジ時間 3,433 ms
ジャッジサーバーID
(参考情報)
judge13 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 1 ms
4,376 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 24 ms
5,332 KB
testcase_03 AC 22 ms
5,380 KB
testcase_04 AC 22 ms
5,356 KB
testcase_05 AC 24 ms
5,264 KB
testcase_06 AC 24 ms
5,312 KB
testcase_07 AC 22 ms
5,260 KB
testcase_08 AC 22 ms
5,248 KB
testcase_09 AC 22 ms
5,272 KB
testcase_10 AC 21 ms
5,336 KB
testcase_11 AC 22 ms
5,328 KB
testcase_12 AC 23 ms
5,256 KB
testcase_13 AC 24 ms
5,320 KB
testcase_14 AC 23 ms
5,360 KB
testcase_15 AC 22 ms
5,268 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 26 ms
5,352 KB
testcase_19 AC 21 ms
5,280 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
int main(){
  int N, M;
  cin >> N >> M;
  vector<string> S(N);
  for (int i = 0; i < N; i++){
    cin >> S[i];
  }
  vector<int> cnt(M, 0);
  for (int i = 0; i < N; i++){
    for (int j = 0; j < M; j++){
      if (S[i][j] == 'o'){
        cnt[j]++;
      }
    }
  }
  int mx = 0;
  for (int i = 0; i < M; i++){
    mx = max(mx, N - cnt[i]);
  }
  cout << mx + 1 << endl;
}
0