SUM
You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.
题目背景
一场比赛需要一道套路题。
题目描述
给定一个长度为 的序列 , 。我们定义
$$sum_{k,l,r}=\begin{cases} \sum\limits_{i=l}^r A_i & ,k=1\\ \sum\limits_{i=l}^r\sum\limits_{j=i}^rsum_{k-1,i,j} &, k\ge 2\end{cases}$$我需要你对于输出 ,答案对 取模。
温馨提示
不要耗费时间在打表找规律上。
输入格式
第一行两个整数 ,含义如题面所述
第二行 个整数,
输出格式
一行 个整数,第个数是。
3 1
1 2 3
1 3 6
3 2
1 2 3
1 6 20
3 10
1 2 3
1 30 420
数据范围
对于 的数据 。
对于 的数据 。
对于 的数据 。
0225
- Status
- Done
- Rule
- IOI
- Problem
- 4
- Start at
- 2026-2-25 8:00
- End at
- 2026-2-25 11:39
- Duration
- 3.7 hour(s)
- Host
- Partic.
- 41