#3607. [Wc2015]K小割

[Wc2015]K小割

Description

image

Format

Input

image

Output

image

Samples

3 3 1 3 100
1 2 3
2 3 4
1 3 5
8
9
12
-1

Limitation