AtCoder Beginner Contest 121
翻译中…
Problem Statement
翻译中…
There are $H$ rows and $W$ columns of white square cells.
翻译中…
You will choose $h$ of the rows and $w$ of the columns, and paint all of the cells contained in those rows or columns.
翻译中…
How many white cells will remain?
翻译中…
It can be proved that this count does not depend on what rows and columns are chosen.
翻译中…
Constraints
翻译中…
- All values in input are integers.
$1 \leq H, W \leq 20$$1 \leq h \leq H$$1 \leq w \leq W$
翻译中…
Input
翻译中…
Input is given from Standard Input in the following format:
翻译中…
H W
h w
翻译中…
Output
翻译中…
Print the number of white cells that will remain.
翻译中…
样例
Input #1
3 2
2 1
Output #1
1
There are $3$ rows and $2$ columns of cells. When two rows and one column are chosen and painted in black, there is always one white cell that remains.
Input #2
5 5
2 3
Output #2
6
Input #3
2 4
2 4
Output #3
0
题目信息
题面与样例版权归 AtCoder 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。