TouchStone
  Please Login
Login Sign Up
 Homepage  Problem Set  Examinations  Submissions  Discussions  Statistics
  • Home
  • Problem Set
  • P4612
  • Problem
  • P4612【HAOI2015】按位或
    Limits : Time Limit : 15000 MS   Memory Limit : 265536 KB  SPJ
    Judgment Tips : 1.5s,256m
    Description

    Input Format

    第一行输入 n 表示 n 个元素,

    第二行输入 2^n 个数,第 i个数表示选到 i−1的概率。

    Output Format

    仅输出一个数表示答案,绝对误差或相对误差不超过 10^(-6)​​ 即可算通过。如果无解则要输出-1

    Sample Input

    2
    0.25 0.25 0.25 0.25

    Sample Output

    2.6666666667

    Hint

    对于100% 的数据,n≤20