結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-01 23:18:37
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 136 ms / 2,000 ms
コード長 720 bytes
コンパイル時間 449 ms
コンパイル使用メモリ 87,080 KB
実行使用メモリ 83,776 KB
最終ジャッジ日時 2023-09-03 03:43:26
合計ジャッジ時間 37,243 ms
ジャッジサーバーID
(参考情報)
judge15 / judge12
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 97 ms
76,508 KB
testcase_01 AC 103 ms
76,988 KB
testcase_02 AC 90 ms
71,656 KB
testcase_03 AC 112 ms
77,452 KB
testcase_04 AC 136 ms
83,508 KB
testcase_05 AC 120 ms
83,620 KB
testcase_06 AC 98 ms
76,596 KB
testcase_07 AC 129 ms
83,636 KB
testcase_08 AC 111 ms
77,768 KB
testcase_09 AC 128 ms
83,368 KB
testcase_10 AC 126 ms
83,556 KB
testcase_11 AC 131 ms
83,460 KB
testcase_12 AC 127 ms
83,672 KB
testcase_13 AC 121 ms
83,728 KB
testcase_14 AC 125 ms
83,708 KB
testcase_15 AC 123 ms
83,696 KB
testcase_16 AC 125 ms
83,600 KB
testcase_17 AC 112 ms
78,304 KB
testcase_18 AC 124 ms
83,744 KB
testcase_19 AC 118 ms
82,624 KB
testcase_20 AC 100 ms
76,456 KB
testcase_21 AC 122 ms
80,064 KB
testcase_22 AC 130 ms
83,776 KB
testcase_23 AC 131 ms
83,632 KB
testcase_24 AC 135 ms
83,400 KB
testcase_25 AC 111 ms
77,332 KB
testcase_26 AC 119 ms
77,604 KB
testcase_27 AC 116 ms
77,780 KB
testcase_28 AC 112 ms
77,528 KB
testcase_29 AC 115 ms
77,644 KB
testcase_30 AC 107 ms
76,964 KB
testcase_31 AC 110 ms
77,384 KB
testcase_32 AC 118 ms
77,644 KB
testcase_33 AC 112 ms
77,404 KB
testcase_34 AC 113 ms
77,540 KB
testcase_35 AC 115 ms
77,192 KB
testcase_36 AC 109 ms
77,560 KB
testcase_37 AC 113 ms
77,192 KB
testcase_38 AC 104 ms
76,440 KB
testcase_39 AC 99 ms
76,248 KB
testcase_40 AC 108 ms
77,332 KB
testcase_41 AC 112 ms
77,348 KB
testcase_42 AC 111 ms
77,460 KB
testcase_43 AC 108 ms
77,228 KB
testcase_44 AC 108 ms
77,400 KB
04_evil_A_01 RE -
04_evil_A_02 RE -
04_evil_A_03 RE -
04_evil_A_04 RE -
04_evil_A_05 RE -
04_evil_A_06 RE -
04_evil_A_07 RE -
04_evil_A_08 RE -
04_evil_A_09 RE -
04_evil_A_10 RE -
05_evil_B_01 MLE -
05_evil_B_02 MLE -
05_evil_B_03 MLE -
05_evil_B_04 MLE -
05_evil_B_05 MLE -
05_evil_B_06 MLE -
05_evil_B_07 MLE -
05_evil_B_08 MLE -
05_evil_B_09 MLE -
05_evil_B_10 MLE -
06_evil_C_01 MLE -
06_evil_C_02 MLE -
06_evil_C_03 MLE -
06_evil_C_04 MLE -
06_evil_C_05 MLE -
06_evil_C_06 MLE -
06_evil_C_07 MLE -
06_evil_C_08 MLE -
06_evil_C_09 MLE -
06_evil_C_10 AC 99 ms
71,768 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

N,K,X,Y=map(int,input().split())
A=list(map(int,input().split()))
Mod=998244353
T=1023

ODP=[[0]*(T+1) for _ in range(K)]
DP =[[0]*(T+1) for _ in range(K)]

for i in range(K):
    DP[i][A[i]]=1

for _ in range(N-1):
    for i in range(K):
        E=ODP[i]
        F=DP[i]
        for x in range(T+1):
            E[x],F[x]=F[x],0

    S=[0]*(T+1)
    for k in range(K):
        E=ODP[k]
        for x in range(T+1):
            S[x]+=E[x]
            S[x]%=Mod

    for i in range(K):
        E=DP[i]
        F=ODP[i]
        for x in range(T+1):
            E[x]=S[x^A[i]]-F[x^A[i]]
            E[x]%=Mod

B=0
for L in DP:
    for k in range(X,min(T,Y)+1):
        B+=L[k]
    B%=Mod
print(B)
0