結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-02 00:52:49
言語 PyPy3
(7.3.13)
結果
AC  
実行時間 276 ms / 2,000 ms
コード長 615 bytes
コンパイル時間 436 ms
コンパイル使用メモリ 87,164 KB
実行使用メモリ 105,064 KB
最終ジャッジ日時 2023-09-03 03:49:50
合計ジャッジ時間 38,258 ms
ジャッジサーバーID
(参考情報)
judge15 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
76,928 KB
testcase_01 AC 101 ms
77,652 KB
testcase_02 AC 84 ms
76,468 KB
testcase_03 AC 95 ms
77,712 KB
testcase_04 AC 276 ms
105,064 KB
testcase_05 AC 178 ms
89,780 KB
testcase_06 AC 90 ms
77,760 KB
testcase_07 AC 250 ms
100,404 KB
testcase_08 AC 105 ms
77,820 KB
testcase_09 AC 242 ms
98,160 KB
testcase_10 AC 219 ms
94,084 KB
testcase_11 AC 246 ms
98,612 KB
testcase_12 AC 216 ms
93,976 KB
testcase_13 AC 168 ms
89,284 KB
testcase_14 AC 202 ms
92,268 KB
testcase_15 AC 177 ms
91,600 KB
testcase_16 AC 205 ms
94,328 KB
testcase_17 AC 116 ms
79,484 KB
testcase_18 AC 219 ms
93,600 KB
testcase_19 AC 152 ms
85,072 KB
testcase_20 AC 101 ms
77,828 KB
testcase_21 AC 148 ms
83,428 KB
testcase_22 AC 217 ms
95,328 KB
testcase_23 AC 237 ms
98,744 KB
testcase_24 AC 268 ms
104,808 KB
testcase_25 AC 99 ms
77,832 KB
testcase_26 AC 102 ms
77,852 KB
testcase_27 AC 106 ms
78,748 KB
testcase_28 AC 98 ms
77,724 KB
testcase_29 AC 98 ms
77,956 KB
testcase_30 AC 93 ms
77,716 KB
testcase_31 AC 91 ms
77,504 KB
testcase_32 AC 104 ms
78,712 KB
testcase_33 AC 97 ms
77,700 KB
testcase_34 AC 110 ms
78,728 KB
testcase_35 AC 94 ms
77,700 KB
testcase_36 AC 94 ms
77,708 KB
testcase_37 AC 94 ms
77,672 KB
testcase_38 AC 86 ms
77,504 KB
testcase_39 AC 93 ms
77,532 KB
testcase_40 AC 96 ms
77,612 KB
testcase_41 AC 96 ms
77,536 KB
testcase_42 AC 98 ms
77,920 KB
testcase_43 AC 96 ms
77,688 KB
testcase_44 AC 96 ms
77,704 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,856 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

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

T=1023
Flag=set()
for a in A:
    Flag.add(a)

Z={a:[0]*(T+1) for a in Flag}

DP=deepcopy(Z)

for a in range(T+1):
    if a in Flag:
        DP[a][a]=1

for _ in range(N-1):
    ODP,DP=DP,deepcopy(Z)

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

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

B=0
for L in DP.values():
    B+=sum(L[X:Y+1])
    B%=Mod
print(B)
0