結果

問題 No.1908 Assault for Keys
ユーザー srjywrdnprkt
提出日時 2023-05-21 01:30:54
言語 C++17
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 43 ms / 2,000 ms
コード長 596 bytes
コンパイル時間 892 ms
コンパイル使用メモリ 105,828 KB
最終ジャッジ日時 2025-02-13 03:53:31
ジャッジサーバーID
(参考情報)
judge3 / judge4
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <cmath>
#include <map>
#include <set>
#include <iomanip>
#include <queue>
#include <algorithm>
#include <numeric>
#include <deque>
#include <complex>
#include <cassert>

using namespace std;
using ll = long long;

int main(){

    int H, W, ans=0, cnt=0;
    cin >> H >> W;
    vector<string> S(H);
    for (int i=0; i<H; i++) cin >> S[i];

    for (int j=0; j<W; j++){
        cnt = 0;
        for (int i=0; i<H; i++){
            if (S[i][j] == 'x') cnt++;
        }
        ans = max(ans, cnt);
    }

    cout << ans+1 << endl;

    return 0;
}
0