import strutils, sequtils, math, sets, algorithm #proc myzip*[S, T](seq1: seq[S], seq2: seq[T], fill: int): seq[tuple[a: S, b: T]] = # var (s1, s2) = (seq1, seq2) # if s1.len < s2.len: # newSeq(result, s2.len) # for i in 0.. a1[i] and should1: should1 = false check = a1[i] result += 1 for j in 0.. a2[j] and not should1: should1 = true check = a2[j] result += 1 break var nya = solve(w, b) var mya = solve(b, w) echo max(nya, mya)