xor是满足交换律的,展开后发现仅仅要能高速求出 [1mod1....1modn],....,[nmod1...nmodn]的矩阵的xor即可了....然后找个规律 C. Magic Formulas time limit per test 2 seconds memory limit per test 256 megabytes input standard input output standard output People in the Tomskaya region like magi…
C. Magic Formulas time limit per test:2 seconds memory limit per test:256 megabytes input standard input output standard output People in the Tomskaya region like magic formulas very much. You can see some of them below. Imagine you are given a…
题目链接:http://codeforces.com/problemset/problem/424/C 题目意思:给出 n 个数:p1, p2, ..., pn,定义: q1 = p1 ^ (1 mod 1) ^ (1 mod 2) ^ (1 mod 3) ...^(1 mod n): q2 = p2 ^ (2 mod 1) ^ (2 mod 2) ^ (2 mod 3) ...^(2 mod n): ... qn = p3 ^ (n mod 1) ^ (n mod 2) ^ (n mod 3)…