This problem is in Contest(s) below:
Contest 1730:25春季信奥编程入门15
Contest 1731:2025春季C++入门6
Contest 1738:2025春季C++入门7