8580: Jumping Steps

内存限制:512 MB 时间限制:4 S
题面:传统 评测方式:文本比较 上传者:
提交:2 通过:1

题目描述

Liu Kanshan loves jumping steps!

Now in front of Liu there're n steps. He stands on the 0th step and wants to jump to the n-th step. He can only jump up (from the x-th step to the x + k-step, for any positive integer k). For one jump, he gets a score of k2

However, mmm of these steps are broken and Liu can't jump onto them. The broken steps are p1,p2,⋯,pm.

Also, if Liu jumps over more than SSS broken steps in one jump (that means  where x and y are the start position and the end position of this jump), he won't get the score for this jump because of overwork. Note that the score he gets before won't be cleared.

Now Liu wonders what is the sum of the total scores he can get in all different possible ways of jumping. Two ways of jumping are different if and only if there exists a step that it is jumped on in one way, and not jumped on in the other way. Since the answer may be very large, you need to find it modulo 1e9+7.

输入格式

输出格式

The only line contains one integer: the answer modulo 1e9 + 7.

输入样例 复制

6 2 1
2 4

输出样例 复制

60

数据范围与提示

分类标签