编程介的小学生 2017-09-10 06:20 采纳率: 20.5%
浏览 700
已采纳

Fix the Lines

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 7.

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

  • 写回答

1条回答

报告相同问题?

悬赏问题

  • ¥15 多电路系统共用电源的串扰问题
  • ¥15 slam rangenet++配置
  • ¥15 有没有研究水声通信方面的帮我改俩matlab代码
  • ¥15 对于相关问题的求解与代码
  • ¥15 ubuntu子系统密码忘记
  • ¥15 信号傅里叶变换在matlab上遇到的小问题请求帮助
  • ¥15 保护模式-系统加载-段寄存器
  • ¥15 电脑桌面设定一个区域禁止鼠标操作
  • ¥15 求NPF226060磁芯的详细资料
  • ¥15 使用R语言marginaleffects包进行边际效应图绘制