Zju2361 Area
时间限制:1s 空间限制:64MB
题目描述
给出N条直线,问他们将一个无限大平面分成了多少份,每一份的面积是多少。(N<=80,不考虑面积小于1e-8的多边形)< p="">
输入格式
The first line of the input file contains N �� the number of lines (1 <= 102="" n="" <="80)." each="" of="" next="" lines="" contains="" four="" integer="" numbers="" x1,="" y1,="" x2="" and="" y2="" -="" the="" coordinates="" two="" different="" points="" line.="" all="" do="" not="" exceed="" by="" their="" absolute="" value.="" no="" coincide.="" p="">
输出格式
First output K - the number of finite parts among those the lines divide the plane to. Next K lines of the output file must contain area parts sorted in non-decreasing order. You answer must be accurate up to 10-4. Due to floating point precision losses possible, do not consider parts with area not exceeding 10-8.
样例输入
1 5 0 0 1 0 1 0 1 1 1 1 0 1 0 1 0 0 0 0 1 1
样例输出
2 0.5000 0.5000
提示
请不要提交,手动测评.
题目来源
ZZY国家队作业
=>=80,不考虑面积小于1e-8的多边形)<>