結果

問題 No.1908 Assault for Keys
ユーザー siro53siro53
提出日時 2022-04-22 23:47:51
言語 C++17
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 27 ms / 2,000 ms
コード長 313 bytes
コンパイル時間 2,022 ms
コンパイル使用メモリ 201,144 KB
実行使用メモリ 5,484 KB
最終ジャッジ日時 2023-09-06 10:44:56
合計ジャッジ時間 3,777 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,380 KB
testcase_01 AC 2 ms
4,380 KB
testcase_02 AC 27 ms
5,228 KB
testcase_03 AC 25 ms
5,468 KB
testcase_04 AC 24 ms
5,320 KB
testcase_05 AC 26 ms
5,408 KB
testcase_06 AC 26 ms
5,244 KB
testcase_07 AC 25 ms
5,228 KB
testcase_08 AC 24 ms
5,320 KB
testcase_09 AC 25 ms
5,208 KB
testcase_10 AC 24 ms
5,284 KB
testcase_11 AC 26 ms
5,240 KB
testcase_12 AC 25 ms
5,348 KB
testcase_13 AC 26 ms
5,260 KB
testcase_14 AC 26 ms
5,348 KB
testcase_15 AC 25 ms
5,484 KB
testcase_16 AC 2 ms
4,380 KB
testcase_17 AC 1 ms
4,380 KB
testcase_18 AC 26 ms
5,256 KB
testcase_19 AC 22 ms
5,240 KB
権限があれば一括ダウンロードができます

ソースコード

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];
	int mx = 0;
	for(int j = 0; j < M; j++) {
		int cnt = 0;
		for(int i = 0; i < N; i++) if(s[i][j] == 'x') cnt++;
		mx = max(mx, cnt);
	}
	cout << mx + 1 << endl;
}
0