ГлавнаяСборникиТурнирыРазделыФорумыУчастникиПечатьПомощьО системе

Сборники > Задачи со всего света > задача:


040. 50354 - Intersecting Rectangles

Гость
• Вопросы к жюри (1)

Задачи сборника

• 003. 50432 - Numbers and Squares
• 004. 50433 - Sum of Cubes
• 005. 50595 - Shuma e numrave
• 010. 50582 - Numri i shifrave
• 016. 50459 - The Biggest Digit
• 020. 50575 - Numri i numrave prim
• 030. 50576 - Numri i numrave perfekte
• 035. 50467 - Random Numbers
• 040. 50354 - Intersecting Rect...
• 050. 50510 - What floor are they?
• 050. 50566 - Mesatarja e pikeve te ...
• 060. 50727 - Fibonacci Numbers
• 061. 50733 - The Highest Average
• 062. 50390 - Total Salary Paid
• 066. 50523 - Total Tax to Pay
• 070. 50534 - Top Trading Company
• 076. 50289 - Monthly Allowance

Обратная связь

Если у вас есть предложения или пожелания по работе Contester, посетите форум сайта www.contester.ru.

Лимит времени 2000/4000/4000/4000 мс. Лимит памяти 65000/65000/65000/65000 Кб.
Question by Ibrahim Mesecan.

Intersecting Rectangles

On XY plain, you are given upper left corner coordinate of two equal sized rectangles. Find the intersection percentage of the rectangles.

Question: Write a program that is going to read two rectangle information and find the intersection percentage.

Input specification
You will be first given the width (w) and height (h) of the rectangles. Then upper left coordinates (x, y) of the two rectangles are given in the following two lines where 0 ≤ (x, y) ≤ 10000 and 1 ≤ (w, h) ≤ 100.

Output specification
Show a floating point number with 3 decimal places that is the intersection percentage to the second rectangle.

Sample Input I
  4 3
  1 4
  3 5
Sample Input II
  2 9
  3 20
  11 20
Sample Output I
  33.333
Sample Output II
  0

Для отправки решений необходимо выполнить вход.

www.contester.ru