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

建议使用的浏览器:

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

5803:Zhu’s Math Problem

题目描述
Zhu is a powerful ACMer/OverWatcher, now a salt-fish comes to ask Zhu a difficult problem. Zhu thinks that problem is so easy, so he wants to know whether you can solve it?
The problem content are as follows.
You are given four integers A , B , C , D , there are many different (a,b,c,d) satisfy $a+c>b+d$ && $a+d\ge b+c$ && $0\le a\le A$ && $0\le b\le B$ && $0\le c\le C$ && $0\le d\le D$ ?
输入解释
First Line is an positive integer $T(T\le 1000)$ , represents there are T test cases.
Four each test:
The first line contain four integers A , B , C , D.
You can assume that $0\le A,B,C,D\le 10^{18}$
输出解释
For each test case, output an positive integer represents answer, because the answer may be large , so you are only need to output answer mod $10^9+7$
输入样例
1
2 1 1 1
输出样例
10
来自杭电HDUOJ的附加信息
Author UESTC
Recommend wange2014

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

源链接: HDU-5803

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

共提交 0

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