Rating changes for the last round are temporarily rolled back. They will be returned soon. ×

Ranveerrand's blog

By Ranveerrand, history, 5 weeks ago, In English

Can anyone help me with this problem? I tried to think about it for 2 straight days but cannot up with a solution. Also the editorial doesn't make sense.

 
 
 
 
  • Vote: I like it
  • -24
  • Vote: I do not like it

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it

I solved this and wrote code with comments explaining it. Link to my AC code here I saw the editorial after solving and I agree it's a bit sparse on the details. Feel free to ask if any doubt.

  • »
    »
    5 weeks ago, # ^ |
    Rev. 2   Vote: I like it -6 Vote: I do not like it

    Sir i still don't get ur solution I had this problem in my mind for 2 days but nothing comes to my mind. BTW sir do u think I can still be red If i am not able to solve this problem for now by next year.

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

      Okay, this is definitely a troll. You don't really care about the solution. Hope this was not a complete waste of time and can help someone else in the future though.

      • »
        »
        »
        »
        5 weeks ago, # ^ |
        Rev. 3   Vote: I like it 0 Vote: I do not like it

        No i actually do care about the solution. I am sorry if it came off as trolling, I am not able to understand how do we brute force for every element in b. I kind of feel guilty that if this comes off as trolling people will refrain from actually helping.

»
5 weeks ago, # |
  Vote: I like it 0 Vote: I do not like it