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: 20
- 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: 20
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 20
- 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: 20
- 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: 5.0s, Memory limit: 512m
- 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: 5.0s, Memory limit: 512m
- 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: 256m
- Total test cases: 10
- 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: 1.0s, Memory limit: 256m
- Total test cases: 10
- 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: 1.0s, Memory limit: 1024m
- Total test cases: 20
- 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: 10.0s, Memory limit: 512m
- 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: 10.0s, Memory limit: 512m
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 2.0s, Memory limit: 512m
- Total test cases: 20
- 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: 10
- 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: 10
- 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: 1
- 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: 1
- 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: 10.0s, Memory limit: 256m
- Total test cases: 10
- 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: 256m
- Total test cases: 10
- 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: 256m
- Total test cases: 75
- 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: 256m
- Total test cases: 75
- 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: 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: 2.0s, Memory limit: 512m
- 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: 5.0s, Memory limit: 512m
- Total test cases: 10
- 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: 5.0s, Memory limit: 512m
- Total test cases: 10
- 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: 256m
- Total test cases: 10
- 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: 256m
- Total test cases: 10
- 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: 1.0s, Memory limit: 512m
- Total test cases: 20
- 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: 512m
- Total test cases: 20
- 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: 10.0s, Memory limit: 1024m
- Total test cases: 40
- 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: 10.0s, Memory limit: 1024m
- Total test cases: 40
- 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: 8.0s, Memory limit: 512m
- 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: 8.0s, Memory limit: 512m
- 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: 20.0s, Memory limit: 256m
- Total test cases: 10
- 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: 20.0s, Memory limit: 256m
- Total test cases: 10
- 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: 1.0s, Memory limit: 512m
- 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: 512m
- 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: 2.0s, Memory limit: 512m
- Total test cases: 3
- 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: 3
- 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: 7
- 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: 7
- 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: 512m
- Total test cases: 1
- 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: 512m
- Total test cases: 1
- 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: 20
- 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: 20
- 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: 100.0s, Memory limit: 512m
- Total test cases: 10
- 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: 100.0s, Memory limit: 512m
- Total test cases: 10
- 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: 10
- 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: 10
- 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: 1.0s, Memory limit: 256m
- Total test cases: 10
- 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: 1.0s, Memory limit: 256m
- Total test cases: 10
- 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: 22
- 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: 22
- 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: 10.0s, Memory limit: 256m
- 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: 10.0s, Memory limit: 256m
- 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: 10.0s, Memory limit: 1024m
- Total test cases: 20
- 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: 10.0s, Memory limit: 1024m
- Total test cases: 20
- 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: 256m
- Total test cases: 100
- 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: 1.0s, Memory limit: 256m
- Total test cases: 100
- 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: 256m
- Total test cases: 100
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 5.0s, Memory limit: 512m
- 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: 5.0s, Memory limit: 512m
- 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: 10.0s, Memory limit: 256m
- Total test cases: 75
- 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: 256m
- Total test cases: 75
- 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: 256m
- Total test cases: 150
- 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: 10.0s, Memory limit: 256m
- Total test cases: 150
- 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: 10.0s, Memory limit: 256m
- Total test cases: 150
- 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: 4.0s, Memory limit: 512m
- Total test cases: 20
- 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: 4.0s, Memory limit: 512m
- Total test cases: 20
- 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: 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: 2.0s, Memory limit: 512m
- 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: 10.0s, Memory limit: 256m
- Total test cases: 75
- 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: 10.0s, Memory limit: 256m
- Total test cases: 75
- 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: 512m
- Total test cases: 15
- 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: 512m
- Total test cases: 15
- 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: 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: 3.0s, Memory limit: 512m
- Total test cases: 10
- 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: 3.0s, Memory limit: 512m
- Total test cases: 10
- 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: 1.0s, Memory limit: 512m
- Total test cases: 15
- 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: 13
- 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: 13
- 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: 10.0s, Memory limit: 256m
- Total test cases: 75
- 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: 256m
- Total test cases: 10
- 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: 256m
- Total test cases: 10
- 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: 3.0s, Memory limit: 512m
- 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: 3.0s, Memory limit: 512m
- 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: 1.0s, Memory limit: 512m
- Total test cases: 20
- 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: 512m
- Total test cases: 20
- 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: 256m
- Total test cases: 10
- 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: 1.0s, Memory limit: 256m
- Total test cases: 10
- 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: 5.0s, Memory limit: 512m
- 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: 10.0s, Memory limit: 256m
- Total test cases: 3
- 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: 10.0s, Memory limit: 256m
- Total test cases: 3
- 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: 512m
- 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: 512m
- 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: 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: 10.0s, Memory limit: 256m
- Total test cases: 150
- 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: 4.0s, Memory limit: 512m
- 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: 4.0s, Memory limit: 512m
- 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: 2048m
- 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: 2048m
- 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: 2.0s, Memory limit: 512m
- 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: 2.0s, Memory limit: 256m
- Total test cases: 10
- 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: 256m
- Total test cases: 10
- 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: 256m
- Total test cases: 10
- 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: 5.0s, Memory limit: 256m
- Total test cases: 11
- 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: 5.0s, Memory limit: 256m
- Total test cases: 11
- 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: 1.0s, Memory limit: 512m
- Total test cases: 15
- 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: 3.0s, Memory limit: 512m
- Total test cases: 10
- 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: 5.0s, Memory limit: 1024m
- Total test cases: 10
- 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: 5.0s, Memory limit: 1024m
- Total test cases: 10
- 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: 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: 2.0s, Memory limit: 512m
- 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: 512m
- 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: 512m
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 10.0s, Memory limit: 256m
- Total test cases: 100
- 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: 256m
- Total test cases: 10
- 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: 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.