// (;ω;)<柔軟な発送が足りなかった… #include using namespace std; class range {private: struct I{int x;int operator*(){return x;}bool operator!=(I& lhs){return x> s1 >> s2; string s; for(int i : range(14)) { s += "x"; } s += s1 + s2; for(int i : range(14)) { s += "x"; } int ha = 0; for(int i : range(s.size()-d+1)) { string cp = s; for(int j : range(i, i+d)) { if(cp[j] == 'x') { cp[j] = 'o'; } else { break; } } int cnt = 0; for(int k : range(s.size())) { if(cp[k] == 'o') { cnt += 1; } else { cnt = 0; } ha = max(ha, cnt); } } printf("%d\n", ha); return 0; }