Hi,
prblem link:
This is the solution of meteora of 2nd problem STRBIT :
for(i = 0; i < N; ++i)
{
ct += inc[i];
if(ct&1) str[i] ^='R'^'G';//result of XORing ??
if(str[i] == 'G') continue;
++ct;++sol;
if(i+K < N) inc[i+K] -= 1;
}
I am not able to understand
Please anyone help…