This problem is in Contest(s) below:
Contest 1022:信息学算法编程期末测试(小学)