結果

問題 No.1908 Assault for Keys
ユーザー tktk_snsntktk_snsn
提出日時 2022-04-22 21:37:06
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 23 ms / 2,000 ms
コード長 707 bytes
コンパイル時間 1,020 ms
コンパイル使用メモリ 92,748 KB
実行使用メモリ 5,388 KB
最終ジャッジ日時 2023-09-06 07:57:10
合計ジャッジ時間 2,499 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 2 ms
4,376 KB
testcase_02 AC 23 ms
5,388 KB
testcase_03 AC 22 ms
5,284 KB
testcase_04 AC 22 ms
5,304 KB
testcase_05 AC 22 ms
5,248 KB
testcase_06 AC 23 ms
5,300 KB
testcase_07 AC 23 ms
5,288 KB
testcase_08 AC 22 ms
5,336 KB
testcase_09 AC 22 ms
5,244 KB
testcase_10 AC 22 ms
5,272 KB
testcase_11 AC 23 ms
5,252 KB
testcase_12 AC 22 ms
5,300 KB
testcase_13 AC 23 ms
5,248 KB
testcase_14 AC 22 ms
5,248 KB
testcase_15 AC 23 ms
5,276 KB
testcase_16 AC 1 ms
4,380 KB
testcase_17 AC 2 ms
4,376 KB
testcase_18 AC 23 ms
5,240 KB
testcase_19 AC 22 ms
5,256 KB
権限があれば一括ダウンロードができます

ソースコード

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