結果
問題 |
No.1304 あなたは基本が何か知っていますか?私は知っています.
|
ユーザー |
|
提出日時 | 2020-12-02 00:56:47 |
言語 | PyPy3 (7.3.15) |
結果 |
WA
|
実行時間 | - |
コード長 | 606 bytes |
コンパイル時間 | 218 ms |
コンパイル使用メモリ | 82,612 KB |
実行使用メモリ | 67,724 KB |
最終ジャッジ日時 | 2025-06-22 02:51:45 |
合計ジャッジ時間 | 8,194 ms |
ジャッジサーバーID (参考情報) |
judge2 / judge3 |
(要ログイン)
ファイルパターン | 結果 |
---|---|
sample | AC * 1 |
other | AC * 22 WA * 22 RE * 30 |
ソースコード
import sys input = lambda : sys.stdin.readline().rstrip() sys.setrecursionlimit(max(1000, 10**9)) write = lambda x: sys.stdout.write(x+"\n") n,k,x,y = list(map(int, input().split())) a = list(map(int, input().split())) nn = n//2 from itertools import combinations_with_replacement as cr, product d = [0]*(1025) for vs in product(*[a for _ in range(nn)]): vv = 0 for v in vs: vv ^= v d[vv] += 1 ans = 0 M = 998244353 for i in range(1025): if d[i]==0: continue for j in range(1025): if x<=(i^j)<=y: ans += d[i]*d[j] ans %= M print(ans//nn)