結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー 👑 KazunKazun
提出日時 2020-12-01 23:49:27
言語 PyPy3
(7.3.15)
結果
TLE  
実行時間 -
コード長 636 bytes
コンパイル時間 475 ms
コンパイル使用メモリ 86,792 KB
実行使用メモリ 264,728 KB
最終ジャッジ日時 2023-09-03 03:45:38
合計ジャッジ時間 39,204 ms
ジャッジサーバーID
(参考情報)
judge11 / judge14
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 265 ms
103,580 KB
testcase_01 AC 432 ms
122,888 KB
testcase_02 AC 266 ms
103,672 KB
testcase_03 TLE -
testcase_04 AC 270 ms
104,720 KB
testcase_05 AC 280 ms
103,616 KB
testcase_06 AC 294 ms
104,596 KB
testcase_07 AC 294 ms
103,612 KB
testcase_08 AC 659 ms
140,956 KB
testcase_09 AC 293 ms
103,660 KB
testcase_10 AC 287 ms
103,568 KB
testcase_11 AC 265 ms
103,312 KB
testcase_12 AC 276 ms
103,652 KB
testcase_13 AC 270 ms
103,540 KB
testcase_14 AC 268 ms
103,488 KB
testcase_15 AC 276 ms
103,484 KB
testcase_16 AC 278 ms
104,344 KB
testcase_17 AC 448 ms
122,992 KB
testcase_18 AC 264 ms
103,772 KB
testcase_19 AC 266 ms
103,496 KB
testcase_20 AC 262 ms
103,572 KB
testcase_21 AC 446 ms
122,884 KB
testcase_22 AC 262 ms
104,740 KB
testcase_23 AC 279 ms
104,532 KB
testcase_24 AC 269 ms
103,572 KB
testcase_25 AC 1,161 ms
196,728 KB
testcase_26 AC 668 ms
141,116 KB
testcase_27 AC 621 ms
140,892 KB
testcase_28 AC 773 ms
158,956 KB
testcase_29 AC 623 ms
140,868 KB
testcase_30 AC 977 ms
177,104 KB
testcase_31 AC 1,485 ms
233,192 KB
testcase_32 AC 617 ms
141,004 KB
testcase_33 AC 1,205 ms
195,232 KB
testcase_34 AC 688 ms
140,732 KB
testcase_35 AC 959 ms
177,180 KB
testcase_36 AC 1,345 ms
214,968 KB
testcase_37 AC 979 ms
177,112 KB
testcase_38 AC 1,001 ms
177,324 KB
testcase_39 AC 1,684 ms
251,272 KB
testcase_40 AC 972 ms
178,252 KB
testcase_41 AC 1,665 ms
251,184 KB
testcase_42 AC 954 ms
177,116 KB
testcase_43 AC 951 ms
177,168 KB
testcase_44 AC 1,308 ms
215,088 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 177 ms
93,040 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

from copy import deepcopy

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

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

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

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

for l 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 m in range(T+1):
        E=DP[m]
        F=ODP[m]
        for x in range(T+1):
            E[x]=(S[x^m]*Count[m]-F[x^m])%Mod

B=0
for i in range(T+1):
    B+=sum(DP[i][X:Y+1])*Count[i]
print(B)
0