shunfurh 于 2017.08.31 23:34 提问

Calculate the Integral

Define the following functions:

Given integer N (1 <= n <= 100) and {an} {bn}, for 1 <= i <= N, define:

and

calculate the integral:

Input

A line containing only the integer N is given first.

Then N lines follow, each line has two float-point number Ai and Bi.

There are several test cases, so process to the end of file.

Output

For each testcase, output a line containing only the integer N first.

Then output a second line containing the result of the integral.

The result should be printed in scientific format which has a precision of 10 digits after radix point.

Sample Input

1
0 2
2
1 3
0 4
3
2 4
1 5
0 6

Sample Output

1
0.0000000000e+000
2
8.0000000000e+000
3
7.2000000000e+001

1个回答

caozhy      2017.09.15 23:46

integral函数
integral函数 计算积分图像 C++: void integral(InputArray src, OutputArray sum, int sdepth=-1 ) c语言：void cvIntegral( const CvArr* image, CvArr* sum, CvArr* sqsum=NULL, CvArr* tilted_sum=NULL );
opencv integral函数

OpenCV积分图函数：integral ()介绍
OpenCV积分图函数：integral ()介绍 积分图概念最初由Paul Viola和Michael Jones在2001年提出，在他们论文“Rapid Object Detection using a Boosted Cascade of Simple Features”中，积分图被当作一种新的图像特征表征方式，可以把检测的Haar特征非常高效的计算出来，用于实时人脸检测系统。
Oracle 注解 主键 错误 Unknown integral data type for ids : java.lang.String

OpenCV中Integral Image的源码

JPA-style positional param was not an integral ordinal错误解决办法

Opencv中integral计算积分图
Paul Viola和Michael Jones在2001年首次将积分图应用在图像特征提取上，在他们的论文“Rapid Object Detection using a Boosted Cascade of Simple Features”中，积分图被当作一种新的图像特征表征方式，可以把检测的Haar特征非常高效的计算出来，用于实时人脸检测系统。积分图是一种能够描述全局信息的矩阵表示方法，其构造方...
JPA-style positional param was not an integral ordinal

Unknown integral data type for ids : java.lang.String; nested exception is org.hibernate.id.Identifi