前情提要:七元问题
简化版问题:∑T⊆S(minT⋅maxT⋅xorT⋅bitandT⋅bitorT)\sum_{T \subseteq S}(min_T\cdot\max_T\cdot\operatorname{xor}_T\cdot\operatorname{bitand}_T\cdot\operatorname{bitor}_T)∑T⊆S(minT⋅maxT⋅xorT⋅bitandT⋅bitorT)
二简版问题:∑T⊆S(xorT⋅bitandT⋅bitorT)\sum_{T \subseteq S}(\operatorname{xor}_T\cdot\operatorname{bitand}_T\cdot\operatorname{bitor}_T)∑T⊆S(xorT⋅bitandT⋅bitorT)
求助以上三个问题中任何一个的优于O(nw3)O(nw^3)O(nw3)的做法(尤其是前两个)