{"raw_statement":[{"iden":"statement","content":"给定长度为 $2^n$ 的数组 $a_i$ ($0 \\leq i < 2^n$)，你可以进行任意次循环移位。\n\n求 $\\sum_{i=0}^{2^n-1} a_i \\oplus i$， $\\sum_{i=0}^{2^n-1} a_i \\& i$，$\\sum_{i=0}^{2^n-1} a_i | i$ 的最大值。其中 $\\oplus, \\&, |$ 分别代表按位异或，按位与，按位或。\n\n对于一个长度为 $m$ 的数组 $x_i$ ($0 \\leq i < m$)，其进行循环移位的结果 $x'_i$ 为:\n\n$$x'_i = \\left\\{\n\t\\begin{array}{ll}\n\t\tx_{i - 1} & i \\neq 0 \\\\\n\t\tx_{m - 1} & i = 0\n\t\\end{array}\\right.$$"},{"iden":"input","content":"输入第一行包含一个整数 $n$ ($1 \\leq n \\leq 20$)，含义如题意所述。\n\n接下来一行包含 $2^n$ 个整数 $a_i$ ($0 \\leq a_i < 2^n$)，为给定的数组。"},{"iden":"output","content":"输出一行三个整数，由空格隔开，为 $\\sum_{i=0}^{2^n-1} a_i \\oplus i$，$\\sum_{i=0}^{2^n-1} a_i \\& i$，$\\sum_{i=0}^{2^n-1} a_i | i$ 的最大值。"}],"translated_statement":null,"sample_group":[["2\n1 3 2 2\n","8 5 11\n"],["4\n1 1 4 5 1 4 1 9 1 9 8 1 0 0 0 0\n","149 41 157\n"]],"show_order":[],"formal_statement":null,"simple_statement":null,"has_page_source":false}