Missile
题号:NC24682
时间限制:C/C++/Rust/Pascal 2秒,其他语言4秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述




输入描述:

输出描述:

Output one line and one number to indicatethe minimum cost under the condition.

示例1

输入

复制
3 2
80 90 100
60 80 100
0.7 0.8 0.9
220
250

输出

复制
300
440