Sequence Accepts: 59 Submissions: 650 Time Limit: 2000/1000 MS (Java/Others) Memory Limit: 65536/65536 K (Java/Others) Problem Description \ \ \ \ Holion August will eat every thing he has found. \ \ \ \ Now there are many foods,but he does…
zxa and leaf Problem Description zxa have an unrooted tree with n nodes, including (n−1) undirected edges, whose nodes are numbered from 1 to n. The degree of each node is defined as the number of the edges connected to it, and each node whose degree…
Problem Description You are given two numbers NNN and MMM. Every step you can get a new NNN in the way that multiply NNN by a factor of NNN. Work out how many steps can NNN be equal to MMM at least. If N can't be to M forever,print −1-1−1. Input In t…