荔园在线

荔园之美,在春之萌芽,在夏之绽放,在秋之收获,在冬之沉淀

[回到开始] [上一篇][下一篇]


发信人: huhaiming (一生只爱她), 信区: Program
标  题: problem H
发信站: 荔园晨风BBS站 (Sat May 24 20:08:05 2003), 站内信件


Fix the Lines


Time limit: 1 Seconds   Memory limit: 32768K
Total Submit: 0   Accepted Submit: 0

------------------------------------------------------------------------
--------
A line segment is said to be fixed if two distinct points on the line
are
fixed. Given several lines on a plane, let's calculate the minimum
number of
 points needed to fix these lines on the plane.


Input

One integer 't' stating the number of test cases, followed by 't'
blocks.

One integer 'n' specifying the number of line segments, followed by n
pairs
of coordinates specifying the ends of the segments. All coordinates
are at
the format of (x, y). the number n does not exceed 100.


Output

One integer a line stating the points needed to fix the line segments.


Sample Input

1

2
1 1 2 1
2 2 3 2


Sample Output

4


Author: Neal Zane



------------------------------------------------------------------------
--------

Submit   Back   Status

------------------------------------------------------------------------
--------

Zhejiang University Online Judge V1.0
--

菩提本无树,明镜亦非台

本来无一物,何处惹尘埃

※ 来源:·荔园晨风BBS站 bbs.szu.edu.cn·[FROM: 192.168.0.200]


[回到开始] [上一篇][下一篇]

荔园在线首页 友情链接:深圳大学 深大招生 荔园晨风BBS S-Term软件 网络书店