Buggy python submission (verdict: Time Limit Exceeded):
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Buggy python submission (verdict: Runtime Error):
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[] * N for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[0].append(1)
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i].append(0)
            elif j == 0:
                dp[i].append(dp[i - 1][j]*(1 - Current_P),10)
            elif j != i:
                dp[i].append((dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P),10)
            else:
                dp[i].append(dp[i - 1][j - 1]*Current_P,10)
    
print(sum(dp[N]))


Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Buggy python submission (verdict: Time Limit Exceeded):
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[] * N for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[0].append(1)
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i].append(0)
            elif j == 0:
                dp[i].append(round(dp[i - 1][j]*(1 - Current_P),10))
            elif j != i:
                dp[i].append(round((dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P),10))
            else:
                dp[i].append(round(dp[i - 1][j - 1]*Current_P,10))
    
print(sum(dp[N]))

Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[] * N for i in range(N+1)]

for i in range(N+1):
    if i == 0:
        dp[0].append(1)
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if j == 0:
                dp[i].append(round(dp[i - 1][j]*(1 - Current_P),10))
            elif j != i:
                dp[i].append(round((dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P),10))
            else:
                dp[i].append(round(dp[i - 1][j - 1]*Current_P,10))
    
print(sum(dp[N][math.ceil(N/2):]))

Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = []
for i in range(N):
    Current_List = [1-P_List[i],P_List[i]]
    if i == 0:
        dp.append(Current_List)
    else:
        dp.append([x*y for x in dp[i-1] for y in Current_List])

Standard = math.ceil(N/2)
Ans = 0
for k in range(len(dp[-1])):
    if bin(k).count("1") >= Standard:
       Ans += dp[-1][k]

print(round(Ans,10))

Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = []
for i in range(N):
    Current_Fault_P,Current_Correct_P = 1-P_List[i],P_List[i]
    if i == 0:
        dp.append([Current_Fault_P,Current_Correct_P])
    else:
        dp.append([])
        for j in dp[i-1]:
            dp[i].append(round(j*Current_Fault_P,10))
            dp[i].append(round(j*Current_Correct_P,10))

Standard = math.ceil(N/2)
Ans = 0
for k in range(len(dp[-1])):
    if bin(k).count("1") >= Standard:
       Ans += dp[-1][k]

print(round(Ans,10))

Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))

Buggy python submission (verdict: Time Limit Exceeded):
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = []
for i in range(N):
    Current_Fault_P,Current_Correct_P = 1-P_List[i],P_List[i]
    if i == 0:
        dp.append([Current_Fault_P,Current_Correct_P])
    else:
        dp.append([])
        for j in dp[i-1]:
            dp[i].append(round(j*Current_Fault_P,10))
            dp[i].append(round(j*Current_Correct_P,10))

Standard = math.ceil(N/2)
Ans = 0
for k in range(len(dp[-1])):
    if bin(k).count("1") >= Standard:
       Ans += dp[-1][k]

print(round(Ans,10))

Fixed submission:
#https://atcoder.jp/contests/dp/tasks/dp_i
import math
N = int(input())
P_List = list(map(float,input().split()))
dp = [[0 for j in range(N + 1)] for i in range(N+1)]
std = math.ceil(N/2)
for i in range(N+1):
    if i == 0:
        dp[i][0] = 1
    else:
        Current_P = P_List[i - 1]
        for j in range(i + 1):
            if (N - i + j) < std:
                dp[i][j] = 0
            elif j == 0:
                dp[i][j] = dp[i - 1][j]*(1 - Current_P)
            elif j != i:
                dp[i][j] = (dp[i - 1][j]*(1 - Current_P)) + (dp[i - 1][j - 1]*Current_P)
            else:
                dp[i][j] = dp[i - 1][j - 1]*Current_P
    
print(sum(dp[N][math.ceil(std):]))