結果

問題 No.1304 あなたは基本が何か知っていますか?私は知っています.
ユーザー WizistWizist
提出日時 2020-12-02 05:00:59
言語 PyPy3
(7.3.15)
結果
WA  
実行時間 -
コード長 659 bytes
コンパイル時間 1,501 ms
コンパイル使用メモリ 86,972 KB
実行使用メモリ 259,332 KB
最終ジャッジ日時 2023-09-03 03:57:02
合計ジャッジ時間 45,873 ms
ジャッジサーバーID
(参考情報)
judge13 / judge15
このコードへのチャレンジ(β)

テストケース

テストケース表示
入力 結果 実行時間
実行使用メモリ
testcase_00 AC 76 ms
71,448 KB
testcase_01 AC 76 ms
71,616 KB
testcase_02 AC 101 ms
92,492 KB
testcase_03 AC 291 ms
259,332 KB
testcase_04 WA -
testcase_05 AC 202 ms
92,840 KB
testcase_06 AC 110 ms
92,656 KB
testcase_07 WA -
testcase_08 AC 159 ms
125,184 KB
testcase_09 WA -
testcase_10 WA -
testcase_11 WA -
testcase_12 AC 248 ms
92,636 KB
testcase_13 AC 196 ms
92,832 KB
testcase_14 AC 221 ms
92,812 KB
testcase_15 WA -
testcase_16 AC 236 ms
92,736 KB
testcase_17 AC 148 ms
102,360 KB
testcase_18 AC 232 ms
92,664 KB
testcase_19 AC 178 ms
92,496 KB
testcase_20 AC 117 ms
92,652 KB
testcase_21 AC 174 ms
102,360 KB
testcase_22 WA -
testcase_23 AC 268 ms
92,592 KB
testcase_24 WA -
testcase_25 AC 181 ms
154,604 KB
testcase_26 AC 156 ms
125,096 KB
testcase_27 AC 163 ms
125,216 KB
testcase_28 AC 154 ms
125,348 KB
testcase_29 WA -
testcase_30 AC 159 ms
139,924 KB
testcase_31 AC 194 ms
169,376 KB
testcase_32 AC 167 ms
125,056 KB
testcase_33 AC 177 ms
154,480 KB
testcase_34 AC 163 ms
125,268 KB
testcase_35 AC 163 ms
139,816 KB
testcase_36 AC 181 ms
154,480 KB
testcase_37 AC 166 ms
140,032 KB
testcase_38 AC 82 ms
76,208 KB
testcase_39 AC 96 ms
83,084 KB
testcase_40 AC 166 ms
139,840 KB
testcase_41 AC 217 ms
192,260 KB
testcase_42 AC 169 ms
139,920 KB
testcase_43 AC 160 ms
140,168 KB
testcase_44 AC 190 ms
168,160 KB
04_evil_A_01 MLE -
04_evil_A_02 MLE -
04_evil_A_03 MLE -
04_evil_A_04 MLE -
04_evil_A_05 MLE -
04_evil_A_06 MLE -
04_evil_A_07 MLE -
04_evil_A_08 MLE -
04_evil_A_09 MLE -
04_evil_A_10 MLE -
05_evil_B_01 MLE -
05_evil_B_02 MLE -
05_evil_B_03 MLE -
05_evil_B_04 MLE -
05_evil_B_05 MLE -
05_evil_B_06 MLE -
05_evil_B_07 MLE -
05_evil_B_08 MLE -
05_evil_B_09 MLE -
05_evil_B_10 MLE -
06_evil_C_01 MLE -
06_evil_C_02 MLE -
06_evil_C_03 MLE -
06_evil_C_04 MLE -
06_evil_C_05 MLE -
06_evil_C_06 MLE -
06_evil_C_07 MLE -
06_evil_C_08 MLE -
06_evil_C_09 MLE -
06_evil_C_10 AC 88 ms
71,400 KB
権限があれば一括ダウンロードができます

ソースコード

diff #

#!/usr/bin/env python3
#
# No.1304 あなたは基本が何か知っていますか?私は知っています.
#
import sys, os, math

def read_ints(): return list(map(int, input().split()))

MOD = 998244353

n, k, x, y = read_ints()
a = read_ints()

m, mx = 1, max(a)
while m <= mx: m <<= 1

c = [[0] * m for _ in range(m)]; s = [0] * m
c[0][0] = s[0] = 1

for _ in range(n):
	d = [[0] * m for _ in range(m)]
	z = [0] * m
	for u in a:
		for i in range(m):
			d[i ^ u][u] = (d[i ^ u][u] + s[i] - c[i][u] + MOD) % MOD
			z[i ^ u] += d[i ^ u][u]
	c = d; s = z

ans = 0
for i in range(x, min(y + 1, m)):
	for u in a:
		ans = (ans + c[i][u]) % MOD

print(ans)
0