UVA10574 Counting Rectangles

Description

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

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA10574/131f2a2b041ee85cd8a3cbcd89ee6cc31e8faeb4.png)

Output Format

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