Need counter cases for 505D

Правка en1, от haleyk100198, 2016-07-03 05:45:04

Link to problem: http://mirror.codeforces.com/problemset/problem/505/D

My submission: http://mirror.codeforces.com/contest/505/submission/18861557

My idea is to count the amount of sub-trees of the graph that doesn't contain a cycle, and the answer would be n-(amount of sub-trees without a cycle). However my code fails on the test case 6 and I have no idea how did the test case got me... Can anyone point out the flaw of my code or even my approach on solving this problem?

Теги graph, 505d

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский haleyk100198 2016-07-03 05:45:04 602 Initial revision (published)