This problem is in Contest(s) below:
Contest 1005:icode信奥训练
Contest 2420:海宁青少年宫基础1班——第4次