UVA12508 网格中的三角形 Triangles in the Grid

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=441&page=show_problem&problem=3952 [PDF](https://uva.onlinejudge.org/external/125/p12508.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12508/5aa1841ba6288d38e2087ab3d384080ed5c49355.png)

Input Format

![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA12508/22a680b052518d21246a47fb5d2027ed8367636e.png)

Output Format

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