Could someone help me with understanding solution to this problem? Although there is an editorial for this problem, there is no explanation or proof of his inclusion-exclusion formula.
This problem's solution keeping me annoying for a long time. Please help me.