Help with tree
CodeChefOpen on judge ↗
Rahul is given a task to find the number of sub-trees of a given a tree. He has thought of an approach and written a program for it, but it is giving him WA. He has asked for your help, please help him. As the answer could be quite large, print your answer modulo 10^9 + 7. Flawed code #include using namespace std; vector g[1000000+10]; long long tem,mod = 1e9 + 7,dp[100000+10]; long lon
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start