結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-02 04:07:21
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 294 ms / 2,000 ms
コード長 586 bytes
コンパイル時間 429 ms
コンパイル使用メモリ 87,180 KB
実行使用メモリ 104,712 KB
最終ジャッジ日時 2023-09-03 03:56:26
合計ジャッジ時間 38,172 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 101 ms
76,852 KB
testcase_01 AC 106 ms
77,376 KB
testcase_02 AC 85 ms
76,436 KB
testcase_03 AC 113 ms
77,736 KB
testcase_04 AC 294 ms
104,712 KB
testcase_05 AC 181 ms
89,784 KB
testcase_06 AC 100 ms
77,660 KB
testcase_07 AC 270 ms
99,048 KB
testcase_08 AC 118 ms
78,144 KB
testcase_09 AC 245 ms
97,892 KB
testcase_10 AC 213 ms
92,500 KB
testcase_11 AC 250 ms
98,688 KB
testcase_12 AC 211 ms
94,436 KB
testcase_13 AC 172 ms
87,672 KB
testcase_14 AC 192 ms
91,992 KB
testcase_15 AC 189 ms
91,680 KB
testcase_16 AC 201 ms
93,944 KB
testcase_17 AC 114 ms
79,492 KB
testcase_18 AC 205 ms
92,436 KB
testcase_19 AC 149 ms
84,840 KB
testcase_20 AC 103 ms
77,980 KB
testcase_21 AC 150 ms
83,536 KB
testcase_22 AC 219 ms
94,288 KB
testcase_23 AC 241 ms
98,524 KB
testcase_24 AC 278 ms
103,404 KB
testcase_25 AC 104 ms
77,452 KB
testcase_26 AC 108 ms
77,784 KB
testcase_27 AC 113 ms
78,948 KB
testcase_28 AC 102 ms
77,716 KB
testcase_29 AC 115 ms
77,960 KB
testcase_30 AC 97 ms
77,672 KB
testcase_31 AC 100 ms
77,360 KB
testcase_32 AC 115 ms
78,920 KB
testcase_33 AC 98 ms
77,596 KB
testcase_34 AC 109 ms
78,896 KB
testcase_35 AC 96 ms
77,468 KB
testcase_36 AC 101 ms
77,692 KB
testcase_37 AC 98 ms
77,580 KB
testcase_38 AC 93 ms
77,304 KB
testcase_39 AC 94 ms
77,300 KB
testcase_40 AC 100 ms
77,592 KB
testcase_41 AC 100 ms
77,632 KB
testcase_42 AC 106 ms
77,924 KB
testcase_43 AC 99 ms
77,488 KB
testcase_44 AC 100 ms
77,628 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 102 ms
71,908 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

N,_,X,Y=map(int,input().split())
A=list(set(map(int,input().split())))

K=len(A)
Mod=998244353

T=1023

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

DP=deepcopy(Z)

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

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

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

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

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