E. Count Pairs
题意
You are given a prime number $p, n$ integers $a_{1}, a_{2}, \ldots, a_{n}(all a_i are different),$ and an integer $k$
Find the number of pairs of indexes $(i, j)(1 \leq i<j \leq n)$ for which $\left(a_{i}+a_{j}\right)\left(a_{i}^{2}+a_{j}^{2}\right) \equiv k \bmod p$
题解
代码
1 |
|