結果

問題 No.1908 Assault for Keys
ユーザー ぷらぷら
提出日時 2022-04-22 21:02:04
言語 C++17
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 22 ms / 2,000 ms
コード長 394 bytes
コンパイル時間 1,827 ms
コンパイル使用メモリ 199,984 KB
実行使用メモリ 5,564 KB
最終ジャッジ日時 2023-09-06 07:14:09
合計ジャッジ時間 3,328 ms
ジャッジサーバーID
(参考情報)
judge12 / judge11
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 1 ms
4,376 KB
testcase_02 AC 21 ms
5,308 KB
testcase_03 AC 21 ms
5,328 KB
testcase_04 AC 21 ms
5,348 KB
testcase_05 AC 20 ms
5,276 KB
testcase_06 AC 21 ms
5,276 KB
testcase_07 AC 20 ms
5,352 KB
testcase_08 AC 20 ms
5,264 KB
testcase_09 AC 22 ms
5,312 KB
testcase_10 AC 22 ms
5,564 KB
testcase_11 AC 22 ms
5,312 KB
testcase_12 AC 22 ms
5,268 KB
testcase_13 AC 22 ms
5,268 KB
testcase_14 AC 20 ms
5,292 KB
testcase_15 AC 22 ms
5,300 KB
testcase_16 AC 1 ms
4,376 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 21 ms
5,308 KB
testcase_19 AC 22 ms
5,444 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];
    }
    int ans = 1;
    for(int i = 0; i < M; i++) {
        int cnt = 0;
        for(int j = 0; j < N; j++) {
            cnt += (S[j][i] == 'x');
        }
        ans = max(ans,cnt+1);
    }
    cout << ans << endl;
}
0