codeforces1436专题

Codeforces1436 A. Reorder

For a given array 𝑎 consisting of 𝑛 integers and a given integer 𝑚 find if it is possible to reorder elements of the array 𝑎 in such a way that ∑𝑛𝑖=1∑𝑛𝑗=𝑖𝑎𝑗𝑗 equals 𝑚? It is forbidden to