This problem is in Contest(s) below:
Contest 1069:C++编程训练27-2020年12月C一级
Contest 1748:25春季信奥编程入门28