結果
問題 | No.1908 Assault for Keys |
ユーザー |
![]() |
提出日時 | 2022-08-23 20:43:16 |
言語 | C++23 (gcc 13.3.0 + boost 1.87.0) |
結果 |
AC
|
実行時間 | 27 ms / 2,000 ms |
コード長 | 502 bytes |
コンパイル時間 | 1,134 ms |
コンパイル使用メモリ | 115,300 KB |
実行使用メモリ | 5,248 KB |
最終ジャッジ日時 | 2024-10-11 03:45:09 |
合計ジャッジ時間 | 2,881 ms |
ジャッジサーバーID (参考情報) |
judge3 / judge2 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 2 |
other | AC * 18 |
ソースコード
#include<iostream> #include<string> #include<vector> #include<algorithm> #include<map> #include<math.h> #define all(x) x.begin(),x.end() #define pb push_back #define ll long long #define P pair<double,double> #define LP pair<ll,ll> using namespace std; int main() { int n,m,ma=0; cin >>n>>m; vector<int> a(m); for (int i = 0; i < n; i++) { string s; cin >> s; for (int j = 0; j < m; j++) { if (s[j] == 'x') a[j] += 1; ma = max(ma, a[j]); } } cout << ma+1 << endl; return 0; }