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

建议使用的浏览器:

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

5275:Dylans loves polynomial

题目描述
First Dylans is given $N$ points $(x_i,y_i)$ in Rectangular Plane Coordinate System.

It guarantees that each $x$ is different.

And there are $Q$ questions.Each question are three numbers:$(L,R,x)$.

His task is to make up a polynomial that its highest coefficient is equal to $(R-L)$.

To check his polynomial,he needs to print the value($y$)of the polynomial by $x$.

Because the value and the pair of points can be very huge,so each calculate must mod $1000000007$.

All points and number $x$ in query are positive integers and not bigger than $250000$.

$2 \leq N \leq 3000,1 \leq Q \leq 3000, 1 \leq L,R \leq N,R>L$
输入解释
In the first line there is a number $N$.

In the next $N$ lines there are two numbers $(X_i,Y_i)$.

Then in the next line there is a number $Q$.

In the next $Q$ lines there are three numbers$(L,R,x)$
输出解释
For each question,output the value of polynomial.
输入样例
4
1 1
2 2
3 3
4 4
3
1 2 1
2 3 3
2 4 1
输出样例
1
3
1

提示
You shouldn't print any space in each end of the line in the hack data.
来自杭电HDUOJ的附加信息
Recommend hujie

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

题目来源 BestCoder Round #45

源链接: HDU-5275

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

共提交 5

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