Жишээ тэстүүд

Оролт
4
1 2
1 3
1 4
Гаралт
3
Оролт
5
1 2
2 3
3 4
3 5
Гаралт
4

Тэмдэглэл

In the second sample, there are four lifelines: paths between vertices 1 and 3, 2 and 4, 2 and 5, and 4 and 5.