結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-02 00:50:33
言語 PyPy3
(7.3.13)
結果
TLE  
実行時間 -
コード長 616 bytes
コンパイル時間 430 ms
コンパイル使用メモリ 87,104 KB
実行使用メモリ 264,852 KB
最終ジャッジ日時 2023-09-03 03:49:55
合計ジャッジ時間 45,942 ms
ジャッジサーバーID
(参考情報)
judge11 / judge13
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 283 ms
103,568 KB
testcase_01 AC 457 ms
122,868 KB
testcase_02 AC 284 ms
103,420 KB
testcase_03 TLE -
testcase_04 AC 300 ms
104,356 KB
testcase_05 AC 295 ms
103,660 KB
testcase_06 AC 294 ms
104,336 KB
testcase_07 AC 297 ms
103,376 KB
testcase_08 AC 633 ms
141,044 KB
testcase_09 AC 288 ms
103,604 KB
testcase_10 AC 292 ms
103,584 KB
testcase_11 AC 295 ms
103,560 KB
testcase_12 AC 295 ms
103,664 KB
testcase_13 AC 290 ms
103,436 KB
testcase_14 AC 294 ms
103,660 KB
testcase_15 AC 293 ms
103,356 KB
testcase_16 AC 296 ms
104,516 KB
testcase_17 AC 462 ms
122,912 KB
testcase_18 AC 288 ms
103,592 KB
testcase_19 AC 290 ms
103,464 KB
testcase_20 AC 291 ms
103,536 KB
testcase_21 AC 461 ms
123,032 KB
testcase_22 AC 295 ms
104,612 KB
testcase_23 AC 295 ms
104,644 KB
testcase_24 AC 288 ms
103,604 KB
testcase_25 AC 1,136 ms
195,364 KB
testcase_26 AC 637 ms
141,100 KB
testcase_27 AC 638 ms
141,112 KB
testcase_28 AC 790 ms
159,196 KB
testcase_29 AC 628 ms
141,104 KB
testcase_30 AC 956 ms
177,116 KB
testcase_31 AC 1,464 ms
233,052 KB
testcase_32 AC 626 ms
141,040 KB
testcase_33 AC 1,141 ms
195,368 KB
testcase_34 AC 627 ms
141,108 KB
testcase_35 AC 959 ms
177,248 KB
testcase_36 AC 1,302 ms
215,072 KB
testcase_37 AC 961 ms
177,264 KB
testcase_38 AC 984 ms
177,180 KB
testcase_39 AC 1,650 ms
251,164 KB
testcase_40 AC 973 ms
177,156 KB
testcase_41 AC 1,642 ms
251,240 KB
testcase_42 AC 976 ms
177,352 KB
testcase_43 AC 967 ms
177,336 KB
testcase_44 AC 1,304 ms
215,016 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 190 ms
93,304 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=[[0]*(T+1) for _ in range(T+1)]

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