• [L] Trapped Minary

  • 时间限制: 1000 ms 内存限制: 65535 K
  • 问题描述
  • This is a true story:
    Minary went home but was incorrectly sent to a town that is in dead rising. She is trapped in that town! No one can goes out and no one can goes in. That town will be an isolated city!
    She found that the zombies go to the plaza one group by one group.
    One group with the population density M goes to the plaze square (x1, y1) ~ (x2, y2) and immediately be into the whole zombie crowd.

    You are asked to calculate out the final population density after all the zombie groups arrived at the plaza.
  • 输入
  • This problem contains several cases.
    The first line is an integer N (0 < N <= 100).
    Then N lines followed. Each line contains 5 decimal: x1, y1, x2, y2 and population density ρ. (0 <= x1 < x2 <= 100000.0, 0 <= y1 < y2 <= 100000.0, 0 < ρ <= 1000.0)
  • 输出
  • For each case, you should output the final population density ρ. (the answer should be printed exact to two digits to the right of the decimal point.)
  • 样例输入
  • 2
    0 0 10 10.5 3.5
    5 5 20 20.5 100.5
    
  • 样例输出
  • 76.56
    
  • 提示
  • 来源
  • XadillaX
  • 操作

显示春菜