题目1.矩形面积交问题描述平面上有两个矩形它们的边平行于直角坐标系的X轴或Y轴。对于每个矩形我们给出它的一对相对顶点的坐标请你编程算出两个矩形的交的面积。输入说明输入仅包含两行每行描述一个矩形。在每行中给出矩形的一对相对顶点的坐标每个点的坐标都用两个绝对值不超过10^7的实数表示。输出说明输出仅包含一个实数为交的面积保留到小数后两位。输入范例1 1 3 32 2 4 4输出范例1.00个人总结1.一开始我是遍历两个数组查找重合部分最后发现可以直接确定坐标数这些部分的数量。#includebits/stdc.h using namespace std; int main() { double x1_1, y1_1, x2_1, y2_1; double x1_2, y1_2, x2_2, y2_2; cin x1_1 y1_1 x2_1 y2_1; cin x1_2 y1_2 x2_2 y2_2; double r1_min_x min(x1_1, x2_1); double r1_max_x max(x1_1, x2_1); double r1_min_y min(y1_1, y2_1); double r1_max_y max(y1_1, y2_1); double r2_min_x min(x1_2, x2_2); double r2_max_x max(x1_2, x2_2); double r2_min_y min(y1_2, y2_2); double r2_max_y max(y1_2, y2_2); double overlap_x_left max(r1_min_x, r2_min_x); double overlap_x_right min(r1_max_x, r2_max_x); double overlap_y_down max(r1_min_y, r2_min_y); double overlap_y_up min(r1_max_y, r2_max_y); double area 0.0; if (overlap_x_left overlap_x_right overlap_y_down overlap_y_up) { double width overlap_x_right - overlap_x_left; double height overlap_y_up - overlap_y_down; area width * height; } cout fixed setprecision(2) area endl; return 0; }Computer hardware is the equipment involved in the function of a computer and consists of the components that can be physically handled. The function of these components is typically divided into three main categories: input, output, and storage. Components in these categories connect to microprocessors,specifically, the computers central processing unit (CPU), the electronic circuitry that provides the computational ability and control of the computer, via wires or circuitry called a bus.计算机硬件是指参与计算机功能运作的设备它由那些能够被实际操作的组件构成。这些组件的功能通常被划分为三大主要类别输入、输出和存储。这些类别的组件均与微处理器相连接具体而言这台计算机的中央处理器CPU即通过被称为总线 的电线或电路来提供计算能力并控制计算机的电子电路系统。Software, on the other hand, is the set of instructions a computer uses to manipulate data, such as a word-processing program or a video game. These programs are usually stored and transferred via the computers hardware to and from the CPU. Software also governs how the hardware is utilized; for example, how information is retrieved from a storage device. Theinteraction between the input and output hardware is controlled by software called the Basic Input/OutputSystem (BIOS) software.另一方面软件是一套指令集计算机利用这些指令来操作数据例如文字处理程序或电子游戏。这些程序这些数据通常是通过计算机的硬件设备进行存储和传输往返于中央处理器之间。软件还控制着硬件的利用方式例如信息如何从存储设备中检索出来输入与输出硬件之间的交互过程由一种名为“基本输入/输出”的软件进行控制系统BIOS 软件。Although microprocessors still are still technically considered to be hardware, portions of their function are also associated with computer software. Since microprocessors have both hardware and software aspects, they are therefore often referred to as firmware.尽管微处理器仍然从技术上讲仍属有效被视为硬件的一部分其部分功能也与计算机软件相关联。由于微处理器既包含硬件层面又涉及软件层面因此它们通常被统称为固件。