This problem is in Contest(s) below:
Contest 1050:2021小学市赛枚举专题
Contest 1030:枚举算法专题