結果

問題 No.1908 Assault for Keys
ユーザー tktk_snsntktk_snsn
提出日時 2022-04-22 21:37:06
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 707 bytes
コンパイル時間 913 ms
コンパイル使用メモリ 93,952 KB
実行使用メモリ 6,944 KB
最終ジャッジ日時 2024-06-24 02:42:27
合計ジャッジ時間 2,302 ms
ジャッジサーバーID
(参考情報)
judge4 / judge5
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <map>
#include <algorithm>
#include <set>
#include <stack>
#include <queue>
#include <cmath>
#include <iomanip>
#include <numeric>
using namespace std;
using ll = long long;
template<class T> inline bool chmax(T& a, T b){ if (a < b){ a = b; return true; } return false; }
template<class T> inline bool chmin(T& a, T b){ if (a > b){ a = b; return true; } return false; }


int main() {
    int n, m; cin >> n >> m;
    vector<string> s(n);
    for(int i=0; i<n; ++i) cin >> s[i];

    int ans = 0;
    for(int j=0; j<m; ++j) {
        int cnt = 0;
        for(int i=0; i<n; ++i) cnt += s[i][j] == 'x';
        chmax(ans, cnt+1);
    }
    cout << ans << endl;
}
0