結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 287 ms
103,736 KB
testcase_01 AC 467 ms
122,952 KB
testcase_02 AC 285 ms
103,544 KB
testcase_03 TLE -
testcase_04 AC 296 ms
104,444 KB
testcase_05 AC 294 ms
103,484 KB
testcase_06 AC 288 ms
104,508 KB
testcase_07 AC 299 ms
103,656 KB
testcase_08 AC 633 ms
141,136 KB
testcase_09 AC 294 ms
103,476 KB
testcase_10 AC 292 ms
103,412 KB
testcase_11 AC 295 ms
103,568 KB
testcase_12 AC 294 ms
103,692 KB
testcase_13 AC 295 ms
103,860 KB
testcase_14 AC 299 ms
103,672 KB
testcase_15 AC 294 ms
103,532 KB
testcase_16 AC 298 ms
104,628 KB
testcase_17 AC 471 ms
122,992 KB
testcase_18 AC 293 ms
103,580 KB
testcase_19 AC 291 ms
103,664 KB
testcase_20 AC 287 ms
103,660 KB
testcase_21 AC 467 ms
122,996 KB
testcase_22 AC 300 ms
104,556 KB
testcase_23 AC 299 ms
104,468 KB
testcase_24 AC 298 ms
103,588 KB
testcase_25 AC 1,150 ms
195,448 KB
testcase_26 AC 642 ms
141,020 KB
testcase_27 AC 640 ms
140,968 KB
testcase_28 AC 804 ms
159,012 KB
testcase_29 AC 641 ms
141,040 KB
testcase_30 AC 983 ms
177,268 KB
testcase_31 AC 1,490 ms
233,548 KB
testcase_32 AC 634 ms
140,916 KB
testcase_33 AC 1,137 ms
195,488 KB
testcase_34 AC 637 ms
141,292 KB
testcase_35 AC 972 ms
177,224 KB
testcase_36 AC 1,325 ms
215,236 KB
testcase_37 AC 972 ms
177,304 KB
testcase_38 AC 984 ms
177,208 KB
testcase_39 AC 1,652 ms
251,404 KB
testcase_40 AC 975 ms
177,116 KB
testcase_41 AC 1,655 ms
251,228 KB
testcase_42 AC 975 ms
177,356 KB
testcase_43 AC 979 ms
177,168 KB
testcase_44 AC 1,311 ms
215,096 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 196 ms
93,108 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=[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