1441: Packing Rectangles
内存限制:128 MB
时间限制:1.000 S
评测方式:文本比较
命题人:
提交:2
解决:0
题目描述
输入
Your program is to read from standard input. The input consists of four lines. Each line describes one given rectangle by two positive integers: the lengths of the sides of the rectangle. Each side of a rectangle is at least 1 and at most 50.
输出
Your program is to write to standard output. The output should contain one line more than the number of solutions. The first line contains a single integer: the minimum area of the enclosing rectangles. Each of the following lines contains one solution described by two numbers p and q with p <= q. These lines must be sorted in ascending order of p, and must all be different.
样例输入 复制
1 2
2 3
3 4
4 5
样例输出 复制
40
4 10
5 8
提示
练习赛8-B