import algorithm, deques, heapqueue, math, sets, sequtils, strutils, sugar, tables proc input*(): string = return stdin.readLine proc chmax*[T: SomeNumber](num0: var T, num1: T) = num0 = max(num0, num1) proc chmin*[T: SomeNumber](num0: var T, num1: T) = num0 = min(num0, num1) proc `%=`*[T: SomeInteger](num0: var T, num1: T) = num0 = num0 mod num1 var xvw: seq[(int, int, int)] dp: array[2010, array[2010, int]] proc solve() = var N, V, L, x, v, w: int (N, V, L) = input().split.map(parseInt) xvw = @[(0, 0, 0)] for _ in 0..