import sequtils,strutils,algorithm template `max=`*(x,y) = x = max(x,y) proc toArray(s:string) :seq[char] = toSeq(s.items) proc countMax[T](arr:seq[T],item:T) : int = if arr.len == 0 : return 0 var pre = arr[0] var cnt = 0 for i in 1..= dst.len : return @[] if result[startIndex + i ] == 'o' : return @[] result[startIndex + i] = 'o' var ans = 0 for i in 0..T.len: for ni in 1..n: ans .max= overWrite(ni,T,i).countMax('o') echo ans