This problem is in Contest(s) below:
Contest 1145:GESP C++ 2024年6月一级到四级编程题