HDU 5730 Shell Necklace
? 解题记录 ? ? HDU ? ? cdq分治 ? ? FFT|NTT ?    2018-07-27 10:33:39    694    0    0
Problem Description
Perhaps the sea‘s definition of a shell is the pearl. However, in my view, a shell necklace with n beautiful shells contains the most sincere feeling for my best lover Arrietty, but even that is not enough.

Suppose the shell necklace is a sequence of shells (not a chain end to end). Considering i continuous shells in the shell necklace, I know that there exist different schemes to decorate the i shells together with one declaration of love.

I wa