結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-02 00:35:13
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 676 bytes
コンパイル時間 332 ms
コンパイル使用メモリ 87,220 KB
実行使用メモリ 264,980 KB
最終ジャッジ日時 2023-09-03 03:48:31
合計ジャッジ時間 35,906 ms
ジャッジサーバーID
(参考情報)
judge14 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 235 ms
103,564 KB
testcase_01 AC 411 ms
123,128 KB
testcase_02 AC 245 ms
103,512 KB
testcase_03 TLE -
testcase_04 AC 262 ms
104,516 KB
testcase_05 AC 252 ms
103,488 KB
testcase_06 AC 257 ms
104,460 KB
testcase_07 AC 265 ms
103,640 KB
testcase_08 AC 560 ms
140,952 KB
testcase_09 AC 267 ms
103,616 KB
testcase_10 AC 260 ms
103,612 KB
testcase_11 AC 262 ms
103,552 KB
testcase_12 AC 260 ms
103,560 KB
testcase_13 AC 262 ms
103,804 KB
testcase_14 AC 265 ms
103,532 KB
testcase_15 AC 262 ms
103,540 KB
testcase_16 AC 252 ms
104,568 KB
testcase_17 AC 413 ms
122,844 KB
testcase_18 AC 260 ms
103,512 KB
testcase_19 AC 250 ms
103,516 KB
testcase_20 AC 250 ms
103,668 KB
testcase_21 AC 408 ms
122,980 KB
testcase_22 AC 268 ms
104,640 KB
testcase_23 AC 263 ms
104,504 KB
testcase_24 AC 261 ms
103,652 KB
testcase_25 AC 1,022 ms
195,408 KB
testcase_26 AC 573 ms
140,936 KB
testcase_27 AC 572 ms
140,980 KB
testcase_28 AC 711 ms
159,224 KB
testcase_29 AC 565 ms
141,064 KB
testcase_30 AC 845 ms
177,316 KB
testcase_31 AC 1,310 ms
233,192 KB
testcase_32 AC 561 ms
140,996 KB
testcase_33 AC 1,009 ms
195,264 KB
testcase_34 AC 569 ms
140,976 KB
testcase_35 AC 854 ms
177,232 KB
testcase_36 AC 1,176 ms
215,216 KB
testcase_37 AC 902 ms
177,204 KB
testcase_38 AC 888 ms
177,256 KB
testcase_39 AC 1,499 ms
251,424 KB
testcase_40 AC 892 ms
177,340 KB
testcase_41 AC 1,524 ms
251,348 KB
testcase_42 AC 879 ms
177,176 KB
testcase_43 AC 900 ms
177,300 KB
testcase_44 AC 1,213 ms
215,084 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 RE -
05_evil_B_02 RE -
05_evil_B_03 RE -
05_evil_B_04 RE -
05_evil_B_05 RE -
05_evil_B_06 RE -
05_evil_B_07 RE -
05_evil_B_08 RE -
05_evil_B_09 RE -
05_evil_B_10 RE -
06_evil_C_01 RE -
06_evil_C_02 RE -
06_evil_C_03 RE -
06_evil_C_04 RE -
06_evil_C_05 RE -
06_evil_C_06 RE -
06_evil_C_07 RE -
06_evil_C_08 RE -
06_evil_C_09 RE -
06_evil_C_10 AC 170 ms
93,024 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

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

T=1023
if K>=10**5:
    T=15

Flag=[0]*(T+1)
for a in A:
    Flag[a]=1

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

DP=deepcopy(Z)

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

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

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

    for i in range(T+1):
        if Flag[i]==0:
            continue

        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:
    B+=sum(L[X:Y+1])
    B%=Mod
print(B)
0