#include using namespace std; using ll=long long; using Pa=pair; using Vll=vector; using VVll=vector; using Vb=vector; using VVb=vector>; using Vs=vector; using VVs =vector>; using Vc=vector; using VVc =vector>; const ll MOD=1000000007; const ll INF=(ll)1<<60;// 10^18 < 1<<60 = 1152921504606846976 // VVll G(N+1,Vll(0)); // vector event; event.emplace_back(a,b); // 以下の関数 oi:エラー出力 OI:正出力 OIV:1次元vector正出力 OIVV:2次元vector正出力 template bool chmax(t&a,u b){if(a bool chmin(t&a,u b){if(bvoid oi(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cerr<void OI(Head&& head,Tail&&... tail){if(sizeof...(tail)!=0){cout< void OIV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll i00=0;i00<(a).size();i00++){if(a[i00]==(ll)1<<60){cout<<"I";} else{cout< void OIVV(T &a){if(a.empty()){cout<<"\n"; return;} for(ll i00=0;i00<(a).size();i00++){for(ll j00=0;j00<(a[i00]).size();j00++){if(a[i00][j00]==(ll)1<<60){cout<<"I";} else{cout<>N>>M; VVb B(N,Vb(M,false)); FOR(i,0,N) FOR(j,0,M){char c; cin>>c; if(c=='o') B[i][j]=true;} Vll A(M,0);// A[i]:=i番目の鍵をもってないのが何人 FOR(j,0,M){ FOR(i,0,N){ if(!B[i][j]) A[j]+=1; } } ll a=*max_element(ALL(A));// 最大で何人もってない (一番手を焼く) OI(min(N,a+1)); return 0; }