当前你的浏览器版本过低,网站已在兼容模式下运行,兼容模式仅提供最小功能支持,网站样式可能显示不正常。
请尽快升级浏览器以体验网站在线编辑、在线运行等功能。

建议使用的浏览器:

谷歌Chrome 火狐Firefox Opera浏览器 微软Edge浏览器 QQ浏览器 360浏览器 傲游浏览器

5786:Interval

题目描述
Alice get M sequences ordered from 1 to M. Now she rearrange the M sequences and connect them from left to right to get a new sequence. And she wanna know the sum of great common divisores of all different interval of the result sequence. She define the sum as beautiful value but it's not the answer. We can easy know there are M! different rearrangements. She want to calculate the sum of beautiful value of all rearragements. It's too difficult. So help her please. Output the answer mod 1000000007.
输入解释
The input contains multiple test cases.

For each test case, the first line contains one integer $M(1\leq M\leq 80000)$. Then followed M lines. Each line start with a integer $S(1\leq S\leq 80000)$, then followed S integers. The sum of S is not big than 80000. All integers are between 1 and 80000.
输出解释
For each test case, output the answer mod 1000000007.
输入样例
2
2 1 2
1 1
1
3 1 1 1
输出样例
14
6
来自杭电HDUOJ的附加信息
Author ZSTU
Recommend wange2014

该题目是Virtual Judge题目,来自 杭电HDUOJ

源链接: HDU-5786

最后修改于 2020-10-25T23:25:38+00:00 由爬虫自动更新

共提交 0

通过率 --%
时间上限 内存上限
6000/3000MS(Java/Others) 65536/65536K(Java/Others)