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:
· A≤Li and B≤Wi or
· A≤Wi and B≤Li .
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 B≤Wi, or
· A×2≤Wi and B≤Li, or
· A≤Li and B×2≤Wi, or
· A≤Wi 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.
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
題號(hào):2201,2202,2203,2204,2205,2206,2207,2208,2209,2210
點(diǎn)擊上方導(dǎo)航欄的訓(xùn)練,點(diǎn)擊題庫(kù),尋找題號(hào)即可找到對(duì)應(yīng)題目,比賽結(jié)束后,請(qǐng)通過(guò)訓(xùn)練->題庫(kù)->尋找對(duì)應(yīng)題目的方式做題
因?yàn)椴淮_定因素太多,就不再安排大家輪流講題了,大家做不出題可以在測(cè)試結(jié)束后去題庫(kù)找對(duì)應(yīng)的題目看題解,希望大家自覺(jué)練習(xí),認(rèn)真練習(xí),考核測(cè)試會(huì)采取不同與現(xiàn)在測(cè)試的方式,兩個(gè)月后綜合測(cè)試成績(jī)不達(dá)標(biāo)者會(huì)退出實(shí)驗(yàn)室,希望大家認(rèn)真對(duì)待