結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-01 23:30:20
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 184 ms / 2,000 ms
コード長 569 bytes
コンパイル時間 971 ms
コンパイル使用メモリ 86,992 KB
実行使用メモリ 83,724 KB
最終ジャッジ日時 2023-09-03 03:44:05
合計ジャッジ時間 31,553 ms
ジャッジサーバーID
(参考情報)
judge14 / judge11
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 88 ms
76,484 KB
testcase_01 AC 107 ms
78,268 KB
testcase_02 AC 86 ms
75,384 KB
testcase_03 AC 114 ms
78,180 KB
testcase_04 AC 184 ms
83,552 KB
testcase_05 AC 118 ms
83,448 KB
testcase_06 AC 95 ms
77,768 KB
testcase_07 AC 161 ms
83,216 KB
testcase_08 AC 111 ms
78,568 KB
testcase_09 AC 154 ms
83,580 KB
testcase_10 AC 132 ms
83,724 KB
testcase_11 AC 161 ms
83,396 KB
testcase_12 AC 144 ms
83,608 KB
testcase_13 AC 114 ms
83,468 KB
testcase_14 AC 133 ms
83,416 KB
testcase_15 AC 126 ms
83,636 KB
testcase_16 AC 137 ms
83,552 KB
testcase_17 AC 105 ms
79,000 KB
testcase_18 AC 136 ms
83,596 KB
testcase_19 AC 108 ms
82,636 KB
testcase_20 AC 92 ms
78,548 KB
testcase_21 AC 116 ms
80,172 KB
testcase_22 AC 152 ms
83,524 KB
testcase_23 AC 164 ms
83,472 KB
testcase_24 AC 182 ms
83,412 KB
testcase_25 AC 110 ms
78,144 KB
testcase_26 AC 109 ms
78,508 KB
testcase_27 AC 110 ms
78,484 KB
testcase_28 AC 106 ms
78,432 KB
testcase_29 AC 110 ms
78,300 KB
testcase_30 AC 113 ms
78,012 KB
testcase_31 AC 111 ms
78,328 KB
testcase_32 AC 107 ms
78,484 KB
testcase_33 AC 113 ms
78,160 KB
testcase_34 AC 107 ms
78,444 KB
testcase_35 AC 105 ms
78,256 KB
testcase_36 AC 109 ms
78,244 KB
testcase_37 AC 108 ms
77,952 KB
testcase_38 AC 98 ms
78,088 KB
testcase_39 AC 100 ms
78,004 KB
testcase_40 AC 108 ms
78,004 KB
testcase_41 AC 109 ms
78,200 KB
testcase_42 AC 106 ms
78,260 KB
testcase_43 AC 106 ms
78,168 KB
testcase_44 AC 110 ms
78,024 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 92 ms
71,764 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]*K for _ in range(T+1)]
DP =[[0]*K for _ in range(T+1)]

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

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

    S=[sum(G)%Mod for G in ODP]

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

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