Area of Rectangles.
Submit solution
Points:
100 (partial)
Time limit:
2.0s
Memory limit:
512M
Author:
Problem type
Allowed languages
Ada, Assembly, Awk, Brain****, C, C#, C++, Dart, Go, Java, JS, Kotlin, Lua, Pascal, Perl, Prolog, Python, Rust, Scala, Swift, VB, Zig
Dados rectángulos, tu tarea es determinar el área total de su unión.
Entrada
La primera línea tiene un entero : el número de rectángulos.
Después, hay
líneas que describen los rectángulos. Cada línea tiene cuatro enteros
e
: un rectángulo comienza en el punto
y termina en el punto
.
Salida
Imprime el área total cubierta por los rectángulos.
Restricciones
Ejemplo de Entrada
3
1 3 4 5
3 1 7 4
5 3 8 6
Ejemplo de Salida
24
Comments