結果

問題 No.1908 Assault for Keys
ユーザー mnmmnm
提出日時 2022-06-06 17:50:47
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 528 bytes
コンパイル時間 746 ms
コンパイル使用メモリ 75,596 KB
実行使用メモリ 5,656 KB
最終ジャッジ日時 2023-10-21 03:39:39
合計ジャッジ時間 2,508 ms
ジャッジサーバーID
(参考情報)
judge9 / judge10
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,348 KB
testcase_01 AC 2 ms
4,348 KB
testcase_02 AC 24 ms
5,656 KB
testcase_03 AC 25 ms
5,656 KB
testcase_04 AC 25 ms
5,656 KB
testcase_05 AC 25 ms
5,656 KB
testcase_06 AC 25 ms
5,656 KB
testcase_07 AC 25 ms
5,656 KB
testcase_08 AC 25 ms
5,656 KB
testcase_09 AC 25 ms
5,656 KB
testcase_10 AC 25 ms
5,656 KB
testcase_11 AC 25 ms
5,656 KB
testcase_12 AC 25 ms
5,656 KB
testcase_13 AC 25 ms
5,656 KB
testcase_14 AC 25 ms
5,656 KB
testcase_15 AC 25 ms
5,656 KB
testcase_16 AC 2 ms
4,348 KB
testcase_17 AC 2 ms
4,348 KB
testcase_18 AC 25 ms
5,656 KB
testcase_19 AC 25 ms
5,656 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <iostream>
#include <vector>
#include <string>
#include <algorithm>
#include <cmath>

#define rep(i,n) for(i=0; i<n; ++i)
#define in(a) cin >> a
#define out(a,b) cout << a << b
using namespace std;
using lint = long long;

int main(void){
    int i, j;
    int n, m;
    in(n);
    in(m);
    vector<string> s(n);
    rep(i,n)    in(s[i]);
    int max=0;
    rep(j,m){
        int cnt=0;
        rep(i,n){
            cnt+=s[i][j]=='x';
        }
        if(cnt>max) max=cnt;
    }
    out(max+1,endl);
    return 0;
}
0