update: Use multiset instead of array, order doesn't matter