HDU 4404 - Worms

Problem - The Same.
Attention - Don't always put the 'inline', it will take many compile time.