• [G] Galaxy

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • Galaxy is an Android Game. It's easy to play:


    Just to link the stars in one stroke.

    It will give you several undirected line(s), you should pass them all and only once.


  • 输入
  • This problem contains several cases.
    The first line of each case is an integer N (0 < N <= 500), indicates the number of lines.
    Then it follows N line(s). Each line contains 4 integers: The two coordinates of the undirected line. (-500 <= x1, y1, x2, y2 <= 500)
  • 输出
  • For each case, if the galaxy can be linked by the rules above, print YES. Or print NO.
  • 样例输入
  • 2
    1 2 3 4
    3 4 5 6
    
  • 样例输出
  • YES
    
  • 提示
  • 来源
  • XadillaX
  • 操作

显示春菜