两个吃奶一个添下面视频_人妻第一页香蕉网_欧美xxxx少妇_妺妺窝人体色www婷婷

Dotcpp  >  編程題庫  >  Twin Buildings(H)
題目 2201:

Twin Buildings(H)

時間限制: 2s 內(nèi)存限制: 320MB 提交: 13 解決: 5

題目描述

As you might already know, space has always been a problem in ICPC Jakarta. To cope with this, ICPC Jakarta is planning to build two new buildings. These buildings should have a shape of a rectangle of the same size. Now, their problem is to find land to build the buildings.

There are Nlands available for sale. The ith land has a rectangular shape of size Li×Wi  For a good feng shui, the building's side should be parallel to the land's sides.

One way is to build the two buildings on two different lands, one on each land (not necessarily with the same orientation). A building of size A×B can be build on the ith land if and only if at least one of the following is satisfied:

·   ALi and BWi  or

·   AWi and BLi .

Alternatively, it is also possible to build two buildings of A×Bon the ith land with the same orientation. Formally, it is possible to build two buildings of A×B on the ith land if and only if at least one of the following is satisfied:

·   A×2≤Li and BWi, or

·   A×2≤Wi and BLi, or

·   ALi and B×2≤Wi, or

·   AWi and B×2≤Li.

Your task in this problem is to help ICPC Jakarta to figure out the largest possible buildings they can build given N available lands. Note that ICPC Jakarta has to build two buildings of A×B; output the largest possible for A×B.


輸入格式

Input begins with a line containing an integer: N (1N100000) representing the number of available lands. The next N lines each contains two integers: Li Wi (1Li,Wi109) representing the size of the land.

輸出格式

Output in a line a number representing the largest building that ICPC Jakarta can build with exactly one decimal point (see sample input/output for clarity).

樣例輸入

2
5 5
3 4

樣例輸出

12.5

提示

零基礎(chǔ)同學(xué)可以先學(xué)習(xí)視頻課程,包含C/C++、Python、百練、藍(lán)橋杯輔導(dǎo)、算法數(shù)據(jù)結(jié)構(gòu)等課程,提供視頻講解以及配套習(xí)題,還有老師答疑,點擊這里了解課程詳情
標(biāo)簽