結果

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

ソースコード

diff #

#include <iostream>
#include <algorithm>
#include <vector>
#include <string>
#include <map>
#include <set>
#include <fstream>
#include <cmath>
#include <stack>
#include <queue>
#include <iomanip>
#include <bitset>
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 minv = 1;
    for(int i=0;i<m;i++){
        int num = 0;
        for(int j=0;j<n;j++){
            if(s[j][i]=='x') num++;
        }
        minv = max(num+1,minv);
    }
    cout << minv << endl;
    
}
0