포럼
문제 ICPC00260

B. Building Boundaries

설명

Maarja wants to buy a rectangular piece of land and then construct three buildings on that land.

The boundaries of the buildings on the ground must have rectangular sizes \(a_1 \times b_1\), \(a_2 \times b_2\), and \(a_3 \times b_3\). They can touch each other but they may not overlap. They can also be rotated as long as their sides are horizontal and vertical.

What is the minimum area of land Maarja has to buy?

제약
입력 형식

The input consists of multiple test scenarios. The first line of input contains a single integer \(t\) (\(1 \le t \le 1000\)), the number of scenarios. Then follow the \(t\) scenarios. Each scenario consists of a single line, containing six integers \(a_1\), \(b_1\), \(a_2\), \(b_2\), \(a_3\) and \(b_3\) (\(1 \le a_1,b_1,a_2,b_2,a_3,b_3 \le 10^9\)).

출력 형식

For each test scenario, output the minimum area of land such that Maarja can construct the three buildings.

예제 1
입력
2
2 3 2 2 1 1
2 4 5 1 2 3
출력
12
21
문제 정보

생성자가 기록되지 않았습니다.

출처 ICPC NCPC 2019

평가 및 의견

B. Building Boundaries

개요
출제자 난이도 Unrated 레이팅 미적용 의견 0 / 1 공개 집계 (커뮤니티 난이도, 주요 주제, 품질)는 의견이 충분히 모이면 공개됩니다.

Log in to rate problems.

개별 의견

아직 의견이 없습니다. 자격이 된다면 위 양식에서 가장 먼저 평가해 보세요.

풀이 제출

B. Building Boundaries

게스트로 둘러보고 있습니다. 로그인하면 풀이를 제출하고 진행 상황을 확인할 수 있습니다. 로그인하고 제출하기
공개
C++20 Tab 들여쓰기 · Ctrl+/ 주석 토글 · Enter 자동 들여쓰기
1 1 1 0 공백: 4 · UTF-8