Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <bits/stdc++.h>
- using namespace std;
- #define ll long long
- #define _test int _TEST; cin>>_TEST; while(_TEST--)
- int main()
- {
- int n, m;
- cin>>n>>m;
- vector<string> s(n);
- for(auto &e: s)
- cin>>e;
- string t = "";
- for(int j=0; j<m; j++)
- {
- int f = 1;
- for(int i=0; i<n; i++)
- f &= (s[i][j] == 'o');
- if(f) t += 'o';
- else t += 'x';
- }
- int ans = 0;
- int val = 0;
- for(auto e: t)
- {
- if(e == 'o') val++;
- else val = 0;
- ans = max(ans, val);
- }
- cout<<ans<<"\n";
- }
Advertisement
Add Comment
Please, Sign In to add comment