Wow, just a question, do you code everyday?
Excellent score.
no
Which class you are of?
I got 200 but with great difficulty
Interesting. But I feel the intended solution would use representing numbers in binary.
For example if p=4, and I am asked which number is in index idx equal to, say, 3, then we can simply to do following:
- Represent idx in binary form in p digits. Add leading 0's if needed. In our case, 3 \equiv 0011_2 .
- Set answer variable, ans to 0.
- If the last bit in idx is 1, then
ans=ans*2+1. Else,ans=ans*2. - Divide idx by 2 and repeat step 3-4 for a total of p times.
The intuition behind it is:
- If a number is even, it is placed in the left subarray.
- If we take all the elements in left subarray, and now focus on them. They all are even, obviously. Divide them by 2 now. Out of all these numbers, the numbers which are still even go to left half of this subarray, rest goto right half.
- Similarly we ca carry on and argue for all further subarrays.
repeat p times
if ( (idx&1)==1)
ans=(ans<<1)|1;
else
ans<<=1;
idx>>=1;
Sir, my logic was same but different
Expected cutoff this time ?
Also what do u guys think. Was the ZCO easier this year or harder
What’s your score
Not good, messed up a lot idk what happens to me in onsite competitions 
I think cutoff is going to be 100
To high for ZCO cutoff
I have stopped using this statement from ZIO 2020 onwards. Anything Is possible
Can anyone share the problems of zco.
my score is 0
Who all are getting 100pts ++ ?
I was only able to solve the first sub task of the first problem (just implement the algorithm in the question) . I thought memoization must be used to make the recursive algorithm faster. But I kept getting RTE. Spend too much time there and so I had only 15 minutes for last problem (I was confident about memoization so I thought if I implemented it I might get 100) and I did not solve the second problem. Getting 20. Hopefully, I will qualify for INOI. Can someone explain how to get rid of TLE in the first problem. I just came home and I think we have to use DP for the second.
That’s the same as reversing the binary representation of idx (taking into account leading zeroes of course), right?
I didn’t attend ZCO, but I think you should have just solved the easiest subtasks on both the problems, the brute force ones. That would surely be enough to qualify.
Yes, if you use exactly p digits and take into account the leading zeroes, I too feel that its just reversing the bits.