Comments

I used unordered_set instead of map. Which should be have constant Time Complexity for inserting and finding elements. Still TLE on subtask 3.

No it doesnt.

+2

getting a good rating in Div3 is even tougher :(

-10

There can be 2 to 4 members in a team.

0

Ohhh, Its right. Thanks