Solve pair-counting and account-merging problems | ByteDance