#P6057. [加油武汉] 七步洗手法
[加油武汉] 七步洗手法
Description
Given an undirected complete graph with vertices, where edges are white and the remaining edges are black.
You need to find the number of monochromatic 3-cycles (that is, triangles).
Input Format
The first line contains integers , with the meaning as described above.
The remaining lines each contain two integers , representing the two endpoints of a white edge. It is guaranteed that the given white edges have no multiple edges and no self-loops.
Output Format
Output one integer in one line, which is the answer.
5 3
1 5
2 5
3 5
4
Hint
- For of the testdata, .
- For of the testdata, .
- For of the testdata, , .
Translated by ChatGPT 5
京公网安备 11011102002149号