結果

問題 No.2810 Have Another Go (Hard)
ユーザー highlighterhighlighter
提出日時 2024-06-24 13:33:12
言語 PyPy3
(7.3.15)
結果
RE  
(最新)
AC  
(最初)
実行時間 -
コード長 423 bytes
コンパイル時間 514 ms
コンパイル使用メモリ 82,400 KB
実行使用メモリ 82,024 KB
最終ジャッジ日時 2024-07-16 01:07:16
合計ジャッジ時間 6,180 ms
ジャッジサーバーID
(参考情報)
judge1 / judge3
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 53 ms
66,784 KB
testcase_01 RE -
testcase_02 RE -
testcase_03 RE -
testcase_04 RE -
testcase_05 RE -
testcase_06 RE -
testcase_07 RE -
testcase_08 RE -
testcase_09 RE -
testcase_10 RE -
testcase_11 AC 130 ms
80,680 KB
testcase_12 AC 164 ms
82,024 KB
testcase_13 AC 79 ms
78,916 KB
testcase_14 AC 171 ms
81,228 KB
testcase_15 AC 77 ms
76,152 KB
testcase_16 RE -
testcase_17 RE -
testcase_18 RE -
testcase_19 RE -
testcase_20 RE -
testcase_21 RE -
testcase_22 RE -
testcase_23 RE -
testcase_24 RE -
testcase_25 RE -
testcase_26 RE -
testcase_27 RE -
testcase_28 RE -
testcase_29 RE -
testcase_30 RE -
testcase_31 RE -
testcase_32 RE -
testcase_33 RE -
testcase_34 RE -
testcase_35 RE -
testcase_36 RE -
testcase_37 RE -
testcase_38 RE -
testcase_39 RE -
testcase_40 RE -
testcase_41 RE -
testcase_42 RE -
testcase_43 RE -
testcase_44 RE -
testcase_45 RE -
testcase_46 AC 45 ms
62,656 KB
testcase_47 AC 66 ms
76,560 KB
testcase_48 AC 58 ms
72,504 KB
testcase_49 AC 62 ms
74,320 KB
testcase_50 AC 54 ms
67,876 KB
testcase_51 RE -
testcase_52 RE -
testcase_53 RE -
testcase_54 RE -
testcase_55 RE -
testcase_56 RE -
testcase_57 RE -
testcase_58 RE -
testcase_59 RE -
testcase_60 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

MOD=998244353
N,M,k=map(int,input().split())
C=list(map(int,input().split()))
dp=[0]*(N*M+1)
dp[0]=1
for i in range(N*M):
    dp[i]%=MOD
    for j in range(1,7):
        dp[min(i+j,N*M)]+=dp[i]
lst=dp[-1]
for c in C:
    dp=[0]*(N*M+1)
    dp[0]=1
    for i in range(N*M):
        if i%N==c:
            dp[i]=0
        dp[i]%=MOD
        for j in range(1,7):
            dp[min(i+j,N*M)]+=dp[i]
    print((lst-dp[-1])%MOD)
0