[gcj] Re: Round 3, Problem D analysis

2009-10-12 Thread Bharath Raghavendran
My replies inline ... -Bharath 2009/10/12 Hawston LLH > Can someone explain point 2? > " And there are only O(sqrt(N)) palindromes up to N - so the number of > groups of consecutive zeros or ones in the first N characters is O(sqrt(N)). > consider N is some x digit number ... divide the di

[gcj] Re: Round 3, Problem D analysis

2009-10-12 Thread Hawston LLH
another question, in point 1, it deals with [0, X], where X from L-1 to R. In point 2 here, it use [L-1,R], what is the relation or typo error? On Mon, Oct 12, 2009 at 5:48 PM, Bharath Raghavendran wrote: > My replies inline ... > > -Bharath > > 2009/10/12 Hawston LLH > >> Can someone explain po

[gcj] Re: Round 3, Problem D analysis

2009-10-12 Thread Bharath Raghavendran
here are the statements that show the relation : "[L,R] can be represented as [0,R] minus [0,L-1]; thus it contains an even number of palindromes if and only if [0,L-1] and [0,R] both contain even or both contain odd number of palindromes." "We can also reduce the number of boundary groups to con

[gcj] Re: Round 3, Problem D analysis

2009-10-12 Thread Hawston LLH
i understand first statements and 2nd statement, seems to me, is just application of 1st statement, and both seems not explaining why [L-1, R] is used, that is strange to me. On Mon, Oct 12, 2009 at 6:17 PM, Bharath Raghavendran wrote: > here are the statements that show the relation : > > "[L,R