結果

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

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 299 ms
103,704 KB
testcase_01 AC 502 ms
122,700 KB
testcase_02 AC 297 ms
103,396 KB
testcase_03 TLE -
testcase_04 AC 302 ms
104,592 KB
testcase_05 AC 298 ms
103,552 KB
testcase_06 AC 301 ms
104,504 KB
testcase_07 AC 298 ms
103,580 KB
testcase_08 AC 692 ms
141,012 KB
testcase_09 AC 297 ms
103,752 KB
testcase_10 AC 296 ms
103,636 KB
testcase_11 AC 294 ms
103,632 KB
testcase_12 AC 305 ms
103,576 KB
testcase_13 AC 296 ms
103,636 KB
testcase_14 AC 299 ms
103,640 KB
testcase_15 AC 297 ms
103,424 KB
testcase_16 AC 301 ms
104,528 KB
testcase_17 AC 490 ms
122,904 KB
testcase_18 AC 297 ms
103,388 KB
testcase_19 AC 302 ms
103,560 KB
testcase_20 AC 299 ms
103,588 KB
testcase_21 AC 496 ms
122,912 KB
testcase_22 AC 299 ms
104,668 KB
testcase_23 AC 301 ms
104,452 KB
testcase_24 AC 328 ms
103,644 KB
testcase_25 AC 1,267 ms
196,712 KB
testcase_26 AC 683 ms
141,000 KB
testcase_27 AC 685 ms
140,924 KB
testcase_28 AC 869 ms
159,092 KB
testcase_29 AC 677 ms
141,136 KB
testcase_30 AC 1,057 ms
177,180 KB
testcase_31 AC 1,617 ms
232,944 KB
testcase_32 AC 674 ms
140,868 KB
testcase_33 AC 1,240 ms
195,352 KB
testcase_34 AC 674 ms
140,932 KB
testcase_35 AC 1,058 ms
177,116 KB
testcase_36 AC 1,426 ms
214,892 KB
testcase_37 AC 1,051 ms
177,148 KB
testcase_38 AC 1,062 ms
177,196 KB
testcase_39 AC 1,812 ms
251,072 KB
testcase_40 AC 1,058 ms
178,244 KB
testcase_41 AC 1,806 ms
251,284 KB
testcase_42 AC 1,055 ms
177,124 KB
testcase_43 AC 1,047 ms
177,236 KB
testcase_44 AC 1,423 ms
214,908 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 188 ms
93,004 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])
print(B)
0