結果

問題 No.1908 Assault for Keys
ユーザー Kanten4205
提出日時 2021-10-20 07:31:57
言語 C++14
(gcc 13.3.0 + boost 1.87.0)
結果
AC  
実行時間 25 ms / 2,000 ms
コード長 407 bytes
コンパイル時間 1,373 ms
コンパイル使用メモリ 168,212 KB
実行使用メモリ 6,820 KB
最終ジャッジ日時 2024-11-27 07:54:20
合計ジャッジ時間 2,627 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;
	//Key.at(i) = 鍵 i を持っていない看守の人数
	vector<int>Key(M, 0);
	for (int i = 0; i < N; i++) {
		string S; cin >> S;
		for (int j = 0; j < M; j++) {
			if (S[j] == 'x') {
				Key.at(j)++;
			}
		}
	}
	int ans = 0;
	for (int i = 0; i < M; i++) {
		ans = max(ans, Key.at(i));
	}
	cout << ans + 1 << endl;
}
0