import strutils, sequtils proc solve() = var N, D: int (N, D) = stdin.readLine.split.map(parseInt) var T, K = newSeq[int](N) for i in 0..