Comments

nice :)

...

thank's :D

how did u solve it with Dsu on tree?

can u explain your approach ? :)

hi i cant find the bug in my code

can anyone help ? http://codeforces.me/contest/893/submission/32598508

yes

bro in youre pow function

you should set it to :

long long pow(long long x, long long y, long long mod) { ... }

you've overflowed ;-)

read my next comment

I like the way of setting pretests and main tests ;-)

good job