Yesterday, a number theory exam, an exam today number theory, learned some knowledge
Yesterday T1 with similar ideas sieve method, the continuous generation of new number with a known good number and a good number not remove
Is not a good number (set x), then it does not take a prime factor becomes px, then the K about more than the number of its number in front of it and then take x is still smaller than it, than it is about the number of
Good results do not take the new prime number is still not a good number, not vice versa, it is good to take a new prime number but also for screening
A pit: p multiplied by the k-th power when the fear of explosion long long, but can not log function, possibly because of increased use log function constant
Today T2 miserable death, I did not read to the meaning of problems
I thought model: clouds on a plate rough stone pillars, each pillar to the average height of sand cast 1, let the sand flow to the lower, until calm
Positive solutions model: a wooden cask around uneven, a steady stream of tap water to the bucket, the water level eventually calm
So the question would be for the minimum topography on the maximum path, running bfs
Read T3, Möbius learned function and the way the line screen, and proved not understand inversion
If you consider this, then that is not too good with the contribution of an answer
This problem is called gcd, but it does not want to Euclid's gcd,
The only two numbers after decomposition, they "overlap" part is gcd
That is, containing the same number of two factor p (or a multiple thereof) of, GCD necessarily contain p (times)
This is easily obtained according to x times the number of gcd (set g [x]), and this number is the gcd of x, 2x ... kx and up
That is known that G [x] is a multiple of d F [d] the sum (F [x] is the number of x only gcd), which uses the inversion Möbius
Pit: only open local long long, otherwise a timeout