`

1071 : The area

c 
阅读更多


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
0
4
分享到:
评论

相关推荐

    基站分布数据(经纬度)

    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 ...

    Bluetooth Low Energy The Developer-'s Handbook.pdf

    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 ...

    GEE教程-gee中area()和ee.Image.pixelArea()两者的区别和面积计算,和不同分辨率(scale)

    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...

    Understanding Clinical Research: Behind the Statistics

    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 ...

    中移动c-ran白皮书 C-RAN The Road Towards Green RAN White Paper (v3.0)

    Traditional RAN architecture has the following characteristics: first, each Base Station (BS) only connects to a fixed number of sector antennas that cover a small area and only handle transmission/...

    java实验5(Circle.java )

    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 ...

    Oracle Database 10g: The Top 20 Features for DBAs

    **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 ...

    Google's PageRank and Beyond: The Science of Search Engine Rankings

    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 ...

    AT070TN82 V1

    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...

    WHO COVID-19 全球数据洞察.zip

    Country (String): The name of the country, territory, or area. WHO_region (String): The WHO regional office to which the country belongs. WHO Member States are grouped into six WHO regions, including ...

    Mathematical System Theory: The Influence of R. E. KaIman

    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...

    07年出版的英文书籍 高级FPGA教程

    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:The Wireless Embedded Internet

    6LoWPAN(IPv6 over Low-Power Wireless Personal Area Networks)是一种网络协议,用于将IPv6数据包传输到低功耗、低带宽的无线个人局域网(WPANs)。它为物联网(IoT)设备提供了直接访问IPv6的能力,从而解决了...

    pep六年级英语第二单元根据答句写问句练习题2.doc

    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 Road vehicles-Controller area network(CAN) 英文全集

    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...

    JVM内核架构--JVM规范

    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 ...

    NT39212C V02 SPEC 20090617.pdf

    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 Local Area Networks.pptx

    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 ...

    美国人使用的一本GRE单词书

    例句: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. ...

Global site tag (gtag.js) - Google Analytics