Cyber_Wizard's blog

By Cyber_Wizard, history, 3 years ago, In English

Hey Everyone!!

The Club of Programmers, IIT BHU is releasing video editorials for Educational Codeforces Round 101. The round was exciting especially the problem D and E were very interesting.

Do check it out : https://www.youtube.com/playlist?list=PLLt4yMoVgczWm1VzN3O4y29VElipDNJ1H

Made By : shikhar7s , Cyber_Wizard , destruction100 codephilic

The editorials for problems D and E are in English, but the rest are in Hindi. We will try to make future editorials completely in English

Do like and subscribe to the channel. We will be posting editorials for future contests too, so stay tuned.

  • Vote: I like it
  • +103
  • Vote: I do not like it

»
3 years ago, # |
  Vote: I like it +33 Vote: I do not like it

Awesome guys, you all are doing a wonderful thing for everyone

»
3 years ago, # |
  Vote: I like it +8 Vote: I do not like it

The explanation to E was great.

»
3 years ago, # |
  Vote: I like it +6 Vote: I do not like it

The explanation is very good. Awesome!!

»
3 years ago, # |
  Vote: I like it +8 Vote: I do not like it

Cyber_Wizard can you help me with my submission 102745636, where i am getting wrong ?

  • »
    »
    3 years ago, # ^ |
    Rev. 3   Vote: I like it +20 Vote: I do not like it

    Yup, as explained in the video, you only have to remove those elements who have all bits as one in their first k-k' positions(In your case: k-dup_K bits). Because suppose your answer has 0 at first k-k' bits.And if any of the sub-strings contain 0 in first k-k' bits then that means this sub-string is already bit similar to our answer because both of our strings match for atleast one i in [0 to k-k') there is zero in both the answer and the substring. So, we don't have to remove the complement of this substring's last k' (in your case dup_K bits) from our answer set.

    Like:

    21 21
    011111111111111111111
    
    Correct Output: 000000000000000000000
    Your Output :   000000000000000000001
    

    For the substring 011111111111111111111, after inverting last 20 bits you, you'll get 00000000000000000000. And you then you won't consider this for your answer. But actually there is one more bit (the first bit which is 0), the answer string will already be a bit similar to this substring.

    • »
      »
      »
      3 years ago, # ^ |
        Vote: I like it +5 Vote: I do not like it

      Video editorial for E was awesome. Thanks a lot!