結果

問題 No.1908 Assault for Keys
ユーザー Kanten4205Kanten4205
提出日時 2021-10-20 07:27:43
言語 C++14
(gcc 13.2.0 + boost 1.83.0)
結果
AC  
実行時間 24 ms / 2,000 ms
コード長 1,119 bytes
コンパイル時間 1,765 ms
コンパイル使用メモリ 170,008 KB
実行使用メモリ 4,380 KB
最終ジャッジ日時 2023-08-18 05:08:19
合計ジャッジ時間 3,166 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

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

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std;
const long long MOD1 = 1000000007;
const long long MOD2 = 998244353;
typedef long long ll;
typedef pair<long long, long long> P;
const long long INF = 1e18;
const ll MOD = INF;
template <typename T>
void input_arr(vector<T>& A, ll N) {
	for (ll i = 0; i < N; i++) {
		cin >> A[i];
	}
}
template <typename T, typename Q>
void input_arr(vector<pair<T, Q>>& A, ll N) {
	for (ll i = 0; i < N; i++) {
		cin >> A[i].first >> A[i].second;
	}
}
template <typename T>
void input_arr(vector<vector<T>>& A, ll H, ll W) {
	for (ll i = 0; i < H; i++) {
		for (ll j = 0; j < W; j++) {
			cin >> A[i][j];
		}
	}
}
long long extgcd(long long A, long long B, long long& X, long long& Y) {
    long long D = A;
    if (B != 0) {
        D = extgcd(B, A % B, Y, X);
        Y -= (A / B) * X;
    }
    else {
        X = 1; Y = 0;
    }
    return D;
}
int main() {
	ll N, M; cin >> N >> M;
	vector<ll>A(M, 0);
	for (ll i = 0; i < N; i++) {
		string S; cin >> S;
		for (ll j = 0; j < M; j++) {
			if (S[j] == 'x') {
				A[j]++;
			}
		}
	}
	sort(A.begin(),A.end());
	cout<<A.back()+1<<endl;
}
0