結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 271 ms
103,544 KB
testcase_01 AC 474 ms
122,924 KB
testcase_02 AC 271 ms
103,688 KB
testcase_03 TLE -
testcase_04 AC 269 ms
104,516 KB
testcase_05 AC 268 ms
103,572 KB
testcase_06 AC 260 ms
104,796 KB
testcase_07 AC 262 ms
103,692 KB
testcase_08 AC 580 ms
141,112 KB
testcase_09 AC 269 ms
104,540 KB
testcase_10 AC 263 ms
103,532 KB
testcase_11 AC 268 ms
103,872 KB
testcase_12 AC 278 ms
104,648 KB
testcase_13 AC 266 ms
103,868 KB
testcase_14 AC 273 ms
104,644 KB
testcase_15 AC 277 ms
104,004 KB
testcase_16 AC 272 ms
104,424 KB
testcase_17 AC 429 ms
122,860 KB
testcase_18 AC 279 ms
103,868 KB
testcase_19 AC 258 ms
103,524 KB
testcase_20 AC 255 ms
103,688 KB
testcase_21 AC 431 ms
122,712 KB
testcase_22 AC 278 ms
104,608 KB
testcase_23 AC 271 ms
104,624 KB
testcase_24 AC 274 ms
103,656 KB
testcase_25 AC 1,062 ms
196,836 KB
testcase_26 AC 589 ms
140,952 KB
testcase_27 AC 613 ms
140,804 KB
testcase_28 AC 758 ms
159,052 KB
testcase_29 AC 588 ms
140,860 KB
testcase_30 AC 912 ms
177,148 KB
testcase_31 AC 1,397 ms
233,148 KB
testcase_32 AC 596 ms
140,996 KB
testcase_33 AC 1,077 ms
196,852 KB
testcase_34 AC 591 ms
140,840 KB
testcase_35 AC 922 ms
177,348 KB
testcase_36 AC 1,216 ms
215,180 KB
testcase_37 AC 909 ms
178,380 KB
testcase_38 AC 909 ms
177,344 KB
testcase_39 AC 1,524 ms
251,220 KB
testcase_40 AC 886 ms
178,152 KB
testcase_41 AC 1,525 ms
251,124 KB
testcase_42 AC 892 ms
177,172 KB
testcase_43 AC 888 ms
178,748 KB
testcase_44 AC 1,236 ms
214,864 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,156 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):
            if Count[m]>=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])
print(B)
0