#include #include #include #include #include #include #include #include #include using namespace std; //嘘greedy int greedy_yoko(int n, int m, vector v){ int ans = 0; string s = "wb"; int cnt_w = 0; int cnt_b = 0; for(int i=0; i v){ int ans = 0; string s = "wb"; int cnt_w = 0; int cnt_b = 0; for(int j=0; j> n >> m; vector v(n); for(int i=0; i> v[i]; } cout << max(greedy_yoko(n,m,v), greedy_tate(n,m,v)) << endl; return 0; }