結果

問題 No.1908 Assault for Keys
ユーザー asaringoasaringo
提出日時 2022-04-23 11:58:30
言語 C++14
(gcc 12.3.0 + boost 1.83.0)
結果
AC  
実行時間 61 ms / 2,000 ms
コード長 725 bytes
コンパイル時間 1,555 ms
コンパイル使用メモリ 167,164 KB
実行使用メモリ 8,944 KB
最終ジャッジ日時 2023-09-07 04:27:19
合計ジャッジ時間 3,731 ms
ジャッジサーバーID
(参考情報)
judge15 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 2 ms
4,376 KB
testcase_01 AC 1 ms
4,384 KB
testcase_02 AC 61 ms
8,600 KB
testcase_03 AC 56 ms
8,500 KB
testcase_04 AC 57 ms
8,516 KB
testcase_05 AC 58 ms
8,372 KB
testcase_06 AC 59 ms
8,176 KB
testcase_07 AC 56 ms
8,608 KB
testcase_08 AC 56 ms
8,876 KB
testcase_09 AC 57 ms
8,632 KB
testcase_10 AC 55 ms
8,740 KB
testcase_11 AC 60 ms
8,428 KB
testcase_12 AC 59 ms
8,796 KB
testcase_13 AC 59 ms
7,692 KB
testcase_14 AC 58 ms
8,312 KB
testcase_15 AC 57 ms
8,944 KB
testcase_16 AC 2 ms
4,376 KB
testcase_17 AC 3 ms
4,388 KB
testcase_18 AC 60 ms
7,132 KB
testcase_19 AC 55 ms
8,216 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#include <bits/stdc++.h>
using namespace std ;
typedef long long ll ;
typedef long double ld ;
typedef pair<ll,ll> P ;
typedef tuple<bool,ll,ll,ll> TP ;
#define chmin(a,b) a = min(a,b)
#define chmax(a,b) a = max(a,b)
#define bit_count(x) __builtin_popcountll(x)
#define gcd(a,b) __gcd(a,b)
#define lcm(a,b) a / gcd(a,b) * b
#define rep(i,n) for(int i = 0 ; i < n ; i++)
#define rrep(i,a,b) for(int i = a ; i < b ; i++)
#define endl "\n"

int n , m ;
char S[1010][1010] ;
vector<int> vec[1010] ;

int main(){
    cin >> n >> m ;
    rep(i,n) rep(j,m){
        cin >> S[i][j] ;
        if(S[i][j] == 'o') vec[j].push_back(i) ;
    }
    int res = 0 ;
    rep(i,m) chmax(res,n-(int)vec[i].size()+1) ;
    cout << res << endl ;
}
0