题目描述
Problem Description
Having opened the door to the dark magician Vani, the team members wander aimlessly through the maze-like path in search of the prison where applepi is held. Suddenly, a bright light flashes before them. "I, Nizem, am the guardian of the dark magic sanctuary. If you can pass my challenge, then you may take the map of the dark magic sanctuary..." In an instant, the team members are teleported to an arena, initially with a bag of capacity K.
The arena has a total of N challenges, each conducted in sequence. The i-th challenge has an attribute \(a_i\). If \(a_i \geq 0\), it means that upon successfully completing this challenge, an additional bag of capacity \(a_i\) will be obtained. If \(a_i = -1\), it means that upon successfully completing this challenge, a map fragment of size 1 will be obtained. The map fragments must be carried in the bag to be taken out of the arena. The bag does not need to be fully packed, but the team members must take all the map fragments they obtain (those they do not obtain need not be considered, as long as the bag's capacity is sufficient to hold all the map fragments after completing all N challenges) to assemble the complete map. Moreover, they must succeed in at least L challenges to leave the arena.
At a loss, the kind guardian Nizem helps to estimate the success probability of each challenge, with the i-th challenge having a success probability of \(p_i\%\). Now, please help predict the probability that the team members can take the map fragments they obtain and leave the arena.
Input Format
The first line contains three integers \(N, L, K\).
The second line contains N real numbers, with the i-th number \(p_i\) representing the success percentage of the i-th challenge.
The third line contains N integers, with the i-th integer \(a_i\) representing the attribute value of the i-th challenge.
Output Format
A single integer representing the desired probability, rounded to six decimal places.
Sample Input and Output
Input Sample #1
3 1 0
10 20 30
-1 -1 2
Output Sample #1
0.300000
Input Sample #2
5 1 2
36 44 13 83 63
-1 2 -1 2 1
Output Sample #2
0.980387
Notes
In the first sample, if the third challenge is successful, whether the first two challenges were successful or not, the team members will have space to accommodate the obtained map fragments. If the third challenge fails, whether the first two challenges were successful or not, it does not meet the requirement of succeeding at least once. Therefore, the desired probability is the probability of winning the third challenge.
For 100% of the data, it is guaranteed that \(0 \leq K \leq 2000\), \(0 \leq N \leq 200\), \(-1 \leq a_i \leq 1000\), \(0 \leq L \leq N\), \(0 \leq p_i \leq 100\).
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分