Блог пользователя levi.ackerman1732

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

Question : 787B - Not Afraid My solution : 99205991

My thought process:

We have to make sure that in every group at least one pair of Ricky & Morty of same Universe are present to prevent the destruction.

My Idea:

insert all the absolute value of members in each group to both a Set & a Vector. If the size of both of them are equal in any group would mean a possibility of destruction ("Yes") else No.

My apologies in advance if I am missing something obvious. Thank you for your time.

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

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

A person can join a group multiple times , if rick from the same universe joins a group twice , you might print no.

like

1000 1

2 20 20