Description
Problem 213 has an output-format mismatch between the problem statement and the checker.
The statement requires each operation to contain three integers:
The sample output and the provided answer files use the same three-integer format. However, algorithmic/problems/213/chk.cc reads only two integers for each operation:
x=ouf.readInt(); y=x+m-1; z=ouf.readInt();
As a result, for a statement-compliant operation such as l r direction, the checker interprets r as direction and will normally reject the output as illegal.
Impact
This mismatch makes it impossible for a submission that follows the documented output format to receive any score. The first ordinary three-integer operation is misparsed, the right endpoint is checked as if it were the direction, and the checker terminates with a wrong-answer verdict before validating the constructed sequence or calculating a score.
Because the two-integer format actually expected by the checker is neither documented nor used by the sample and answer files, contestants cannot produce a scoring submission from the repository's published specification.
There are also several related inconsistencies in the problem package:
testdata/1.ans selects x = 3 for an input with n = 2 and provides an operation without a direction value.
- The statement says that
x and m are printed on the first line, while the sample prints them on separate lines.
- The statement specifies a 5-second time limit, but
config.yaml specifies 2 seconds.
Suggested changes
-
Update the checker to read all three operation fields:
x = ouf.readInt();
y = ouf.readInt();
z = ouf.readInt();
Then keep the existing interval-length, bounds, and direction validation.
-
Replace testdata/1.ans with a valid answer, for example:
Description
Problem 213 has an output-format mismatch between the problem statement and the checker.
The statement requires each operation to contain three integers:
The sample output and the provided answer files use the same three-integer format. However,
algorithmic/problems/213/chk.ccreads only two integers for each operation:x=ouf.readInt(); y=x+m-1; z=ouf.readInt();As a result, for a statement-compliant operation such as
l r direction, the checker interpretsrasdirectionand will normally reject the output as illegal.Impact
This mismatch makes it impossible for a submission that follows the documented output format to receive any score. The first ordinary three-integer operation is misparsed, the right endpoint is checked as if it were the direction, and the checker terminates with a wrong-answer verdict before validating the constructed sequence or calculating a score.
Because the two-integer format actually expected by the checker is neither documented nor used by the sample and answer files, contestants cannot produce a scoring submission from the repository's published specification.
There are also several related inconsistencies in the problem package:
testdata/1.ansselectsx = 3for an input withn = 2and provides an operation without a direction value.xandmare printed on the first line, while the sample prints them on separate lines.config.yamlspecifies 2 seconds.Suggested changes
Update the checker to read all three operation fields:
Then keep the existing interval-length, bounds, and direction validation.
Replace
testdata/1.answith a valid answer, for example: