UVA10502 Counting Rectangles

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=17&page=show_problem&problem=1443 [PDF](https://uva.onlinejudge.org/external/105/p10502.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10502/b43f603a109e65b11e72391637f8638ba8cf85b8.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10502/06397b2abbb4deae259d3c59b362d9c47686f935.png)

Output Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10502/afe377b62aef426a5a5e4cfa5f2fa23416bd641f.png)