Problem 28471 --仙人掌

28471: 仙人掌

Time Limit: 1 Sec  Memory Limit: 512 MB
Submit: 4  Solved: 1
[Submit][Status][Web Board][Creator:][下载FPS0元][添加到购物车][下载测试数据0元][25230kb]

Description

Input

Output

Sample Input

2
3 2
1 2
1 3
5 4
1 2
2 3
2 4
1 5

Sample Output

2
8

HINT

Source

[Submit][Status]