結果
問題 | No.1908 Assault for Keys |
ユーザー |
![]() |
提出日時 | 2024-02-28 08:42:42 |
言語 | C++17 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 29 ms / 2,000 ms |
コード長 | 507 bytes |
コンパイル時間 | 1,956 ms |
コンパイル使用メモリ | 195,824 KB |
最終ジャッジ日時 | 2025-02-19 21:49:43 |
ジャッジサーバーID (参考情報) |
judge1 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include <bits/stdc++.h> using namespace std; #ifdef LOCAL #include "settings/debug.cpp" #define _GLIBCXX_DEBUG #else #define Debug(...) void(0) #endif #define rep(i, n) for (int i = 0; i < (n); ++i) using ll = long long; using ull = unsigned long long; int main() { int n, m; cin >> n >> m; vector<string> s(n); rep(i, n) cin >> s[i]; int ans = 0; rep(i, m) { int cnt = 0; rep(j, n) if (s[j][i] == 'x') cnt++; ans = max(ans, cnt + 1); } cout << ans << endl; return 0; }