You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 10.0s, Memory limit: 1024m
- Total test cases: 20
- Scoring is partial: 0-100% based on fraction of test cases passed

## Problem type: INTERACTIVE

This is an interactive problem. Your solution communicates with a hidden judge
via stdin/stdout. You do NOT read from files.

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.

You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 10.0s, Memory limit: 1024m
- Total test cases: 20
- Scoring is partial: 0-100% based on fraction of test cases passed

## Problem type: INTERACTIVE

This is an interactive problem. Your solution communicates with a hidden judge
via stdin/stdout. You do NOT read from files.

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.


You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 2.0s, Memory limit: 1024m
- Total test cases: 8
- 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.

You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 2.0s, Memory limit: 1024m
- Total test cases: 8
- 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.


You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 1.0s, Memory limit: 1024m
- Total test cases: 30
- 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.

You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 1.0s, Memory limit: 1024m
- Total test cases: 30
- 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.


You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 1.0s, Memory limit: 128m
- Total test cases: 10
- 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.

You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 1.0s, Memory limit: 128m
- Total test cases: 10
- 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.


You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 15.0s, Memory limit: 1024m
- Total test cases: 27
- Scoring is partial: 0-100% based on fraction of test cases passed

## Problem type: INTERACTIVE

This is an interactive problem. Your solution communicates with a hidden judge
via stdin/stdout. You do NOT read from files.

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.

You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 15.0s, Memory limit: 1024m
- Total test cases: 27
- Scoring is partial: 0-100% based on fraction of test cases passed

## Problem type: INTERACTIVE

This is an interactive problem. Your solution communicates with a hidden judge
via stdin/stdout. You do NOT read from files.

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.


You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 2.0s, Memory limit: 512m
- Total test cases: 50
- 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.

You are solving a competitive programming problem.

Problem directory: /app
- Read statement.txt for the full problem description
- Time limit: 2.0s, Memory limit: 512m
- Total test cases: 50
- 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.