Problem H
Veggspjöld
Languages
en
is

Hrolleifur is quite the cinephile and collects all kinds of paraphernalia related to movies. One of the things he has done is collect posters that advertise movies. He makes sure to own at least one poster for each movie, which he then glues to the wall in his room.
Now Hrolleifur has collected posters for years and is getting close to the point where they cover his wall completely. After Hrolleifur has glued a poster to the wall it will not move. Unfortunately Hrolleifur hasn’t always been careful enough when gluing them to the wall and thus some of the posters overlap even though the wall isn’t fully covered.
Hrolleifurs’ wall and all his posters are rectangular. Even though Hrolleifur hasn’t always been careful to make sure the posters don’t overlap, he always makes sure they aren’t crooked, with each edge aligned parallel to the corresponding edge of the wall.
How much area is left unused?
![\includegraphics[width=0.5\textwidth ]{sample2}](/problems/veggspjold/file/statement/en/img-0002.png)
Input
The first line contains three integers
Output
Print a single integer, the area of the part of the wall not covered with any posters in square centimeters.
Scoring
Group |
Points |
Constraints |
1 |
10 |
|
2 |
15 |
|
3 |
20 |
|
4 |
25 |
|
5 |
25 |
|
6 |
5 |
No further constraints |
Sample Input 1 | Sample Output 1 |
---|---|
10 10 5 0 2 0 2 3 5 1 3 9 10 0 10 1 2 4 5 3 7 6 8 |
73 |
Sample Input 2 | Sample Output 2 |
---|---|
5 7 3 0 2 0 3 1 4 2 5 3 5 4 7 |
16 |