Problem C. Counting Stars
时间限制 2000 ms
内存限制 32 MB
Little A is an astronomy lover, and he has found that the sky was so beautiful!
So he is counting stars now!
There are n stars in the sky, and little A has connected them by m non-directional edges.
It is guranteed that no edges connect one star with itself, and every two edges connect different pairs of stars.
Now little A wants to know that how many different "A-Structure"s are there in the sky, can you help him?
An "A-structure" can be seen as a non-directional subgraph G, with a set of four nodes V and a set of five edges E.
If $V=(A,B,C,D)$ and $E=(AB,BC,CD,DA,AC)$, we call G as an "A-structure".
It is defined that "A-structure" $G_1=V_1+E_1$ and $G_2=V_2+E_2$ are same only in the condition that $V_1=V_2$ and $E_1=E_2$.
输入数据
输出数据
For each test case, just output one integer--the number of different "A-structure"s in one line.
样例输入
复制
4 5
1 2
2 3
3 4
4 1
1 3
4 6
1 2
2 3
3 4
4 1
1 3
2 4
样例输出
$ Mathjax font initiator $