結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー titiatitia
提出日時 2020-12-01 06:28:04
言語 PyPy3
(7.3.15)
結果
AC  
実行時間 106 ms / 2,000 ms
コード長 436 bytes
コンパイル時間 560 ms
コンパイル使用メモリ 87,168 KB
実行使用メモリ 76,592 KB
最終ジャッジ日時 2023-09-03 03:17:42
合計ジャッジ時間 13,472 ms
ジャッジサーバーID
(参考情報)
judge11 / judge15
このコードへのチャレンジ
(要ログイン)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 87 ms
76,304 KB
testcase_01 AC 87 ms
76,416 KB
testcase_02 AC 79 ms
76,212 KB
testcase_03 AC 89 ms
76,588 KB
testcase_04 AC 106 ms
76,336 KB
testcase_05 AC 95 ms
76,356 KB
testcase_06 AC 85 ms
76,460 KB
testcase_07 AC 101 ms
76,336 KB
testcase_08 AC 88 ms
76,444 KB
testcase_09 AC 100 ms
76,436 KB
testcase_10 AC 99 ms
76,040 KB
testcase_11 AC 99 ms
76,268 KB
testcase_12 AC 95 ms
76,292 KB
testcase_13 AC 95 ms
76,228 KB
testcase_14 AC 94 ms
76,236 KB
testcase_15 AC 94 ms
76,360 KB
testcase_16 AC 97 ms
76,428 KB
testcase_17 AC 88 ms
76,484 KB
testcase_18 AC 95 ms
76,368 KB
testcase_19 AC 92 ms
76,336 KB
testcase_20 AC 86 ms
76,188 KB
testcase_21 AC 89 ms
76,504 KB
testcase_22 AC 99 ms
76,236 KB
testcase_23 AC 102 ms
76,300 KB
testcase_24 AC 104 ms
76,336 KB
testcase_25 AC 90 ms
76,456 KB
testcase_26 AC 87 ms
76,040 KB
testcase_27 AC 87 ms
76,248 KB
testcase_28 AC 87 ms
76,196 KB
testcase_29 AC 87 ms
76,296 KB
testcase_30 AC 88 ms
76,444 KB
testcase_31 AC 87 ms
76,396 KB
testcase_32 AC 87 ms
76,436 KB
testcase_33 AC 87 ms
76,592 KB
testcase_34 AC 87 ms
76,228 KB
testcase_35 AC 86 ms
76,360 KB
testcase_36 AC 87 ms
76,288 KB
testcase_37 AC 85 ms
76,336 KB
testcase_38 AC 80 ms
76,288 KB
testcase_39 AC 84 ms
76,140 KB
testcase_40 AC 87 ms
76,448 KB
testcase_41 AC 85 ms
76,300 KB
testcase_42 AC 85 ms
76,296 KB
testcase_43 AC 84 ms
76,400 KB
testcase_44 AC 85 ms
76,272 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 RE -
権限があれば一括ダウンロードができます

ソースコード

diff #

N,K,X,Y=map(int,input().split())
A=list(map(int,input().split()))

mod=998244353
S=set(A)
LEN=len(S)

DP=[[0]*1024 for i in range(N+1)]
DP[0][0]=1

for i in range(1,N+1):
    for j in range(1024):
        for s in S:
            DP[i][j^s]+=DP[i-1][j]
            DP[i][j^s]%=mod

        DP[i][j]-=DP[i-2][j]*LEN
        DP[i][j]+=DP[i-2][j]
    DP[2][0]=0

ANS=0
for i in range(X,min(Y+1,1024)):
    ANS=(ANS+DP[N][i])%mod

print(ANS)
0