Hello
I solve setsandunion(https://codeforces.com/contest/1882/problem/B) by python but memory exceed burst out
I thought that i already handle greedy option but i don't know how to develop further
here is my code https://codeforces.com/contest/1882/submission/225242610