thank you note for admin

Hi admin ;
thank you for your efforts

Please give editorial for ENTRY Problem - CodeChef

No doubt, many programmers just copy paste from their database, may be that contest was not good for you!

But unfortunately, it was for many.

I too know the logic upon which lazy propagation works, but I was struggling to get AC.

For a average programmer, it was good contest. I got many upsolving problems.

For a good programmer like you, I think there are various other problems too which are of high level than the problem you mentioned, you can showoff your skills over that problems.

Anyways, can you help me in solving problem which you mentioned? I am unable to find any blog/forum(I could have asked myself but I don’t have enough reputation points).
Few lines about logic may help me! What we are saving in each node?

1 Like

I have seen various solutions, they all are having “int seg[N][10]”, can you help in what we are saving in that 2nd dimension?

@karan_arora
In each node of the segment tree you store the numbers of locks with specific number, so seg[i][j]=number of locks in the interval corresponding to i currently set to j.
Then updating by 1 is just a rotation of the array seg[i].

1 Like

@ahmadreza1994
I don’t understand what you mean by “just lazy propagation”.You still have to speicify the concrete update/query operations. Can you link to your submission?

1 Like

@ceilks, thanks sir :). I got it !

@ceilks thank you for explain. you are our great… i do not read problem finely --> 9 again to 0 … ok we can use seg[n][10] for it…