This problem is in Contest(s) below:
Contest 1147:GESP C++ 2024年9月一级到四级编程题
Contest 1148:GESP C++ 2024年9月一级
Contest 1160:GESP一级考试编程第二题汇总
Contest 1149:GESP一级历年编程题