>>892
コメントで説明があるよ

■ip[0...*]
length of ip >= 2+sqrt(n/4)
strictly,
length of ip >= 2+(1<<(int)(log(n/4+0.5)/log(2))/2).
■w[0...n*5/8-1]