UVA11618 The Amazing Triangle Counting Machine

Description

[problemUrl]: https://uva.onlinejudge.org/index.php?option=com_onlinejudge&Itemid=8&category=78&page=show_problem&problem=2665 [PDF](https://uva.onlinejudge.org/external/116/p11618.pdf) ![](https://cdn.luogu.com.cn/upload/vjudge_pic/UVA11618/4b82ffb0064aec9f57e57d23c6ffe1098eb3db1d.png)

Input Format

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

Output Format

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