Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/32768 K (Java/Others)
Total Submission(s): 5805 Accepted Submission(s): 4051
题目附加图片
/*
Name:
Copyright:
Author: skywolf
Date: 06-04-13 22:36
Description: 本文为原创,转载请注明出处。
*/
#include <stdio.h>
double calculate(double x);
int T;
double x1, x2, x3, y1, y2, y3;
double k1, b, a;
int main() {
while(scanf("%d", &T) != EOF) {
while(T--) {
scanf("%lf%lf%lf%lf%lf%lf", &x1, &y1, &x2, &y2, &x3, &y3);
//求直线的斜率: k1
k1 = (y3 - y2) / (x3 - x2);
//直线的方程 : y = k1*x + b;
b = y2 - k1 * x2;
// 抛物线的方程 : y = a(x - x1)^2 + y1;
a = (y2 - y1) / (x2 - x1) / (x2 - x1);
printf("%.2lf\n", calculate(x3)-calculate(x2));
}
}
return 0;
}
double calculate(double x) {
return a/3*x*x*x - (a*x1+k1/2)*x*x + (a*x1*x1+y1-b)*x;
}
题目连接
- 大小: 1.4 KB
分享到:
相关推荐
range: Approximate area within which the cell could be. (radius in meters) samples: No of measures processed to get this data changeble: ●1 =The location is determined by processing samples ●0= We ...
Area of points and line strings is 0, and the area of multi geometries is the sum of the areas of their components (intersecting areas are counted multiple times). Arguments: this:geometry (Geometry...
The chi-squared goodness-of-fit test The chi-squared test for independence Fisher's exact test Sensitivity, specificity, and predictive values Considering medical investigations Sensitivity and ...
Running on a single coin-sized battery, BLE can run for years, connecting and extending everything from Personal Area Network devices to next-generation sensors. In Bluetooth Low Energy, one of the ...
Include methods named setRadius(), getRadius, and computeDiameter(), which calculates the circle's diameter, and computeArea(), which computes the circle's area. Hint: diameter of a circle is twice ...
This little app captures the area behind the mouse cursor and pastes it onto the start button.
This is a book about Ethernet, a local area network (LAN) technology that allows you to connect a variety of computers together with a low-cost and extremely flexible network system. Virtually every ...
It can be a reference book for people who want to know more about the ideas behind the currently popular search engines, and it provides an introductory text for beginning researchers in the area of ...
There is hardly a research area in this field which has not been influenced by his thinking. In the pages that follow, there is ample documentation of Kalman's influence in the field which earned him...
Chapter 2: Architecting Area Chapter 3: Architecting Power Chapter 4: Example Design: The Advanced Encryption Standard Chapter 5: High-Level Design Chapter 6: Clock Domains Chapter 7: Example Design: ...
It presents the main findings of 4WARD (Architecture and Design for the Future Internet), a European Integrated Project within Framework Programme 7, which addressed this area from an innovative ...
ISO 11898-1-2003 Road vehicles-Controller area network(CAN)-Part 1:Data link layer and physical signalling ISO 11898-2-2003 Road vehicles-Controller area network(CAN)-Part 2:High-speed medium access...
Method area: holds the details of each class loaded by the class loader subsystem. Heap: holds every object being created by the threads during execution Thread specific runtime data areas: Program ...
The Method Area Type Information The Constant Pool Field Information Method Information Class Variables A Reference to Class ClassLoader A Reference to Class Class Method Tables An Example of ...
Understanding and Using the Controller Area Network Communication Protocol: Theory and Practice. 一本优秀的CAN总线详述的参考资料。
this code packet is about, which is the new seraching area,body area network. This study is analiysis and matlab simulation .
广泛的领域 轻巧易用JavaScript / CSS库可创建可扩展的文本区域并轻松编写... wideArea ( ) //without selector, to search all textarea(s) in the page wideArea ( "#writingContainer" ) //search for textarea(s)
Role of the ABA Drafting Administrator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1:1 Setting Up Administrative Access Rights . . . . . . . . . . . . . . . . . . . . . . . . . . . ....
ISO 11898 consists of the following parts, under the general title Road vehicles -- Controller area network (CAN): - Part 1: Data link layer adn physical signalling - Part 2: High-speed medium access...
Numerical analysis of the notional area in cold field electron emission from arrays