結果

問題 No.1682 Unfair Game
ユーザー mymelochanmymelochan
提出日時 2021-09-17 22:36:36
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 262 bytes
コンパイル時間 1,105 ms
コンパイル使用メモリ 87,040 KB
実行使用メモリ 71,644 KB
最終ジャッジ日時 2023-09-12 08:37:11
合計ジャッジ時間 4,255 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 73 ms
71,632 KB
testcase_01 AC 74 ms
71,124 KB
testcase_02 WA -
testcase_03 WA -
testcase_04 AC 71 ms
71,364 KB
testcase_05 WA -
testcase_06 AC 74 ms
71,384 KB
testcase_07 AC 73 ms
71,412 KB
testcase_08 WA -
testcase_09 AC 75 ms
71,156 KB
testcase_10 WA -
testcase_11 AC 74 ms
71,284 KB
testcase_12 AC 73 ms
71,384 KB
testcase_13 AC 74 ms
71,260 KB
testcase_14 AC 74 ms
71,464 KB
testcase_15 AC 72 ms
71,516 KB
testcase_16 AC 71 ms
71,228 KB
testcase_17 AC 75 ms
71,420 KB
testcase_18 AC 72 ms
71,236 KB
testcase_19 WA -
testcase_20 AC 72 ms
71,348 KB
testcase_21 WA -
権限があれば一括ダウンロードができます

ソースコード

diff #

N = int(input())
P = list(map(int,input().split()))
MOD = 10**9+7
dp = [1,0]
for i,p in enumerate(P):
    ndp = [0,0]
    if p > 50:
        ndp = [dp[0]+dp[1],dp[1]+dp[0]]
    else:
        ndp = [dp[0]*2,dp[1]*2] 
    dp = [ndp[0]%MOD,ndp[1]%MOD] 
print(dp[1])
0