結果
問題 | No.1682 Unfair Game |
ユーザー | 👑 SPD_9X2 |
提出日時 | 2021-09-17 21:52:06 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 569 bytes |
コンパイル時間 | 742 ms |
コンパイル使用メモリ | 87,108 KB |
実行使用メモリ | 76,440 KB |
最終ジャッジ日時 | 2023-09-12 07:20:22 |
合計ジャッジ時間 | 3,164 ms |
ジャッジサーバーID (参考情報) |
judge12 / judge13 |
(要ログイン)
テストケース
テストケース表示入力 | 結果 | 実行時間 実行使用メモリ |
---|---|---|
testcase_00 | AC | 78 ms
71,372 KB |
testcase_01 | AC | 77 ms
71,256 KB |
testcase_02 | WA | - |
testcase_03 | WA | - |
testcase_04 | WA | - |
testcase_05 | WA | - |
testcase_06 | WA | - |
testcase_07 | WA | - |
testcase_08 | WA | - |
testcase_09 | WA | - |
testcase_10 | WA | - |
testcase_11 | WA | - |
testcase_12 | WA | - |
testcase_13 | WA | - |
testcase_14 | AC | 76 ms
71,540 KB |
testcase_15 | AC | 77 ms
71,472 KB |
testcase_16 | AC | 76 ms
71,328 KB |
testcase_17 | WA | - |
testcase_18 | AC | 76 ms
71,308 KB |
testcase_19 | WA | - |
testcase_20 | WA | - |
testcase_21 | WA | - |
ソースコード
""" 表が出る確率が大きければ、期待値はひっくり返る… 表の枚数の期待値は、表の出る確率の和 確率の和 mod 200 で解けばよい dp[i][x] = i番目まで見て、確率mod200が~の場合の数 """ import sys from sys import stdin mod = 10**9+7 N = int(stdin.readline()) P = list(map(int,stdin.readline().split())) dp = [0] * 200 dp[0] = 1 for p in P: ndp = [dp[j] % mod for j in range(200)] for j in range(200): ndp[(j+p)%200] += dp[j] dp = ndp dp[0] -= 1 print (sum(dp[51:150]) % mod)