• [J] Come to NBUT

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • To welcome the leaders,NB school plans to plant flowers of three different colors in a rectangular garden.The garden's size is M * N.As shown in Figure.
    The rules follows:
    One:Each color of flowers will form a circle.
    Two:Each color of flowers can not overlap to another color of flowers.And flowers can not be planted out of garden.
    Three:The area of each color of flowers should be as large as possible.
    Now school will give you three points,you should plant each color of flowers around each point.You can only finish one of its,and then plant another flowers.
    So,how to make the planting sequence of three kinds of flowers can you get the

  • 输入
  • Input until EOF.
    First line will contain two digitals M(4<=M<=100) and N(4<=N<=100) means the size of rectangular garden.
    Next three lines have three points,each line contains x and y means the center of Each color of flowers.x and y will in the M * N Rectangular box.
    Each point will not coincidence.
    If one of colors of flowers before expanding is in another circle,it can not expand and the area of it is 0.
    You can assume that PI(π) is 3.14.
  • 输出
  • Please output the three points' maximum area in one line.Retained two decimal places.
  • 样例输入
  • 4 6
    1.00 1.00
    2.00 2.00
    4.00 3.00
  • 样例输出
  • 12.73
  • 提示
  • 来源
  • Hungar
  • 操作

显示春菜