Блог пользователя Cyber_Wizard

Автор Cyber_Wizard, история, 3 года назад, По-английски

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.

  • Проголосовать: нравится
  • +103
  • Проголосовать: не нравится

»
3 года назад, # |
  Проголосовать: нравится +33 Проголосовать: не нравится

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

»
3 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

The explanation to E was great.

»
3 года назад, # |
  Проголосовать: нравится +6 Проголосовать: не нравится

The explanation is very good. Awesome!!

»
3 года назад, # |
  Проголосовать: нравится +8 Проголосовать: не нравится

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

  • »
    »
    3 года назад, # ^ |
    Rev. 3   Проголосовать: нравится +20 Проголосовать: не нравится

    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.