結果

問題 No.66 輝け☆全国たこやき杯
ユーザー KudeKude
提出日時 2021-01-25 01:01:10
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 135 ms / 5,000 ms
コード長 250 bytes
コンパイル時間 295 ms
コンパイル使用メモリ 87,092 KB
実行使用メモリ 77,444 KB
最終ジャッジ日時 2023-09-02 12:39:26
合計ジャッジ時間 2,050 ms
ジャッジサーバーID
(参考情報)
judge13 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 78 ms
71,072 KB
testcase_01 AC 78 ms
71,172 KB
testcase_02 AC 77 ms
71,336 KB
testcase_03 AC 76 ms
70,868 KB
testcase_04 AC 79 ms
71,256 KB
testcase_05 AC 113 ms
76,368 KB
testcase_06 AC 94 ms
76,204 KB
testcase_07 AC 102 ms
76,700 KB
testcase_08 AC 114 ms
77,444 KB
testcase_09 AC 135 ms
77,076 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

m = int(input())
s = [int(input()) for _ in range(1 << m)]
dp = [1] * (1 << m)
for i in range(m):
    dp = [dp[j] * sum(dp[j ^ x ^ 1 << i] * s[j] ** 2 / (s[j] ** 2 + s[j ^ x ^ 1 << i] ** 2) for x in range(1 << i)) for j in range(1 << m)]
print(dp[0])
0