You are solving a competitive programming problem. Problem directory: /app - Read statement.txt for the full problem description - Time limit: 2.0s, Memory limit: 256m - Total test cases: 70 - Scoring is partial: 0-100% based on fraction of test cases passed ## Problem type: SPECIAL JUDGE This problem accepts multiple valid outputs. Your solution will be checked by a special judge, not by exact string matching. Read AGENT.md in this directory for compilation, testing, and workflow guidance. You can call `bash /app/submit.sh` at any time during this task to get a graded score and feedback on `/app/solution.cpp` from the same judge that scores the final result. Submit early and iterate. Begin by reading the full problem statement in statement.txt.