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 ...
**Description:** ASMM automatically tunes the shared memory components of the System Global Area (SGA). It adjusts memory allocations based on workload demands, improving performance and reducing the ...
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 ...
6. **Active Area**: The active area measures 152.4 mm (W) × 91.44 mm (H), indicating the size of the visible portion of the display. This is the area where the actual display information is presented...
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: ...
6LoWPAN(IPv6 over Low-Power Wireless Personal Area Networks)是一种网络协议,用于将IPv6数据包传输到低功耗、低带宽的无线个人局域网(WPANs)。它为物联网(IoT)设备提供了直接访问IPv6的能力,从而解决了...
10. 应答:The supermarket is near the residential area. 11. 应答:The bookstore is two blocks down the road from the school. 这些练习题旨在帮助学生巩固对英语疑问句的掌握,包括一般疑问句(Is/Are there...
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 ...
Changes in this area, as indicated in the revision history, suggest improvements in performance or compatibility. ### Absolute Maximum Ratings: The absolute maximum ratings specify the highest ...
Chapter 5 of the Computer Concepts 2014 course focuses on Local Area Networks (LANs), which are essential components of modern computing infrastructure. This chapter delves into the fundamental ...
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 ...
例句:The aboriginal tribes have lived in the area for thousands of years. 26. **aborigines**:名词,意为“土著居民”。例句:The aborigines were deeply connected to the land and its traditions. 27. ...
this code packet is about, which is the new seraching area,body area network. This study is analiysis and matlab simulation .