結果

問題 No.1908 Assault for Keys
ユーザー forest3
提出日時 2022-08-17 17:00:05
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 381 bytes
コンパイル時間 1,305 ms
コンパイル使用メモリ 171,644 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-10-04 19:36:18
合計ジャッジ時間 3,003 ms
ジャッジサーバーID
(参考情報)
judge5 / judge3
このコードへのチャレンジ
(要ログイン)
ファイルパターン 結果
sample AC * 2
other AC * 18
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
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];

	vector<int> k( M );
	for( int i = 0; i < N; i++ ) {
		for( int j = 0; j < M; j++ ) {
			if( S[i][j] == 'x' ) k[j]++;
		}
	}
	int ans = 0;
	for( int i = 0; i < M; i++ ) ans = max( ans, k[i] );
	ans++;

	cout << ans << endl;
}
0