链接:https://ac.nowcoder.com/acm/contest/57361/K
来源:牛客网
Sylvy has an array aaa of length nnn. Glacy wants you to calculate ∑S⊆{x∣x∈Z,1≤x≤n}∣S∣(minx∈Sax)(maxx∈Sax)(⨁x∈Sax)\sum_{S\subseteq\left\{x|x\in Z, 1\le x\le n\right\}}\left|S\right|\left(\min_{x\in S}a_x\right)\left(\max_{x\in S}a_x\right)\left(\bigoplus_{x\in S}a_x\right)∑S⊆{x∣x∈Z,1≤x≤n}∣S∣(minx∈Sax)(maxx∈Sax)(⨁x∈Sax) module 998244353998244353998244353, where ⨁\bigoplus⨁ denotes the bitwise operator xor
输入格式
The input is given from Standard Input in the following format: