AT_abc471_e [ABC471E] Sum of Square of Sum
Description
There are $ N $ balls numbered $ 1 $ to $ N $ . Ball $ i $ has an integer $ A_i $ written on it.
For a way of choosing some balls from the $ N $ balls, define the **score** of that choice as the square of the sum of the numbers written on the chosen balls.
Find the sum, modulo $ 998244353 $ , of the scores of all $ \binom{N}{K} $ ways of choosing $ K $ balls from the $ N $ balls.
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ K $ $ A_1 $ $ \dots $ $ A_N $
Output Format
Output the answer.
Explanation/Hint
### Sample Explanation 1
There are three ways of choosing two balls from three balls: choosing balls $ 1,2 $ gives a score of $ (1+10)^2=121 $ , choosing balls $ 1,3 $ gives a score of $ (1+100)^2=10201 $ , and choosing balls $ 2,3 $ gives a score of $ (10+100)^2=12100 $ .
The answer is the sum of these, $ 121+10201+12100=22422 $ .
### Sample Explanation 2
Multiple balls may have the same number written on them.
### Sample Explanation 3
Find the sum modulo $ 998244353 $ .
### Constraints
- $ 1 \leq K \leq N \leq 2\times 10^5 $
- $ 1 \leq A_i \leq 10^9 $
- All input values are integers.