Fortunately, the remaining cow feed billboard is situated in front of the lawnmower billboard, potentially obscuring it.
Bessie, determined to remove the offensive lawnmower billboard completely from her view, hatches a risky plan. She plans to steal a large rectangular tarp from the barn and sneak out late at night to cover the remaining portion of the lawnmower billboard, so that she can no longer see any part of it.
Given the locations of the two billboards, please help Bessie compute the minimum area of the tarp she will need. Since the only tarps available in the barn are rectangular in size, Bessie observes that she may conceivably need a tarp whose area is slightly larger than the exposed area of the lawnmower billboard, as illustrated in the example below. The tarp may only be placed such that its sides are parallel to those of the other billboards (i.e., it cannot be "tilted").
奶牛贝茜曾经从农场中向外看去,可以看到两个刊登着美味的牛饲料广告的广告牌,这令她非常满意。
不幸的是,其中一个广告牌最近已更新,现在刊登着广告“农民拉里的割草机”。
但是贝茜可不喜欢割草机,这些割草机只会把她爱吃的草割的一干二净。
幸运的是,剩下的牛饲料广告牌位于割草机广告牌的前面,有可能将其遮挡住。
贝茜希望这个讨厌的割草机广告牌能够完全从自己的视线中消失,并为此制定了一个冒险计划。
她计划从谷仓里偷一个大的矩形防水布,并在深夜偷偷溜走,用它覆盖割草机广告牌的其余部分,使得她能完全看不到割草机广告牌。
给定两个广告牌的位置,请帮助贝茜计算她所需要的防水布的最小面积。
由于谷仓中只有矩形的防水布,因此贝茜发现为了将割草机广告牌完全遮盖,所需的防水布面积可能会大于割草机广告牌的裸露面积,如下例所示。
防水布在放置时,其边必须与广告牌的边平行,即不能倾斜放置。
第一行包含四个整数 x1,y1,x2,y2,其中 (x1,y1)和 (x2,y2)表示割草机广告牌的左下角和右上角坐标。
第二行按照如上形式,包含四个整数,表示牛饲料广告牌的左下角和右上角坐标。
牛饲料广告牌可能完全遮盖了割草机广告牌,或部分遮盖了割草机广告牌,也可能完全没有遮盖割草机广告牌。
2 1 7 4
5 -1 10 3
15