3617 - dzy loves game

Input

第一行两个整数N,K. 接下来每行N个整数描述Boss的属性。 最后一行N个整数表示Ai

Output

仅一行,表示最少损失血量,保留三位小数

Examples

Input

1 2
1 1
0

Output

1.414

Hint

N<=50000,K<=3

保证A1=0,其它所有Ai>0

属性值小于等于100,完全随机。

仅有三个测试点

Time Limit 1 second
Memory Limit 128 MB
Discuss Stats
上一题 下一题