This problem is in Contest(s) below:
Contest 1151:2024年中国大学生程序设计竞赛(CCPC)新疆赛区部分题
Contest 1150:2024年合肥市青少年信息学科普日