import strutils, sequtils proc f(a: seq[int64], turn: bool): bool = let n = a.len if a.all(proc(x: int64): bool = a[0]==x): result = true else: let s = a.foldl(a+b) var j = 0 while j