This is 100% claude code generated, but I believe the problem is real (I had an empty program that pass the tests).
Problem 23 (A=B): All test inputs are multiples of 100, causing checker to skip all validation
Description
Problem 23's custom checker (check.cpp) has an early-exit path at line 351:
void check_Tid(){
test_gen::Tid=inf.readInteger();
if (test_gen::Tid%100==0) quitf(_ok,"Test 0.");
}
When Tid % 100 == 0, the checker immediately returns _ok (accepted / full score) without generating any test strings or running the contestant's A=B program.
All three test inputs in testdata/ trigger this path:
| File |
Tid |
Tid % 100 |
Result |
1.in |
0 |
0 |
Skipped — immediate _ok |
2.in |
100 |
0 |
Skipped — immediate _ok |
3.in |
200 |
0 |
Skipped — immediate _ok |
This means any submission, including an empty program that produces no output, receives a perfect score of 100.
Reproduction
Submit the following trivial C++ program for problem 23:
#include <bits/stdc++.h>
using namespace std;
int main() {
return 0;
}
It scores 100/100 on all three test cases.
Root cause
The checker's test generator maps Tid % 100 to a generator function via vf[data_id]. Generator vf[0] is an intentionally empty lambda (produces zero test cases). Valid generators are at indices 1–16+. The early exit if (test_gen::Tid%100==0) quitf(_ok,"Test 0.") was likely intended as a sentinel for the empty-generator case, but all shipped test inputs happen to be multiples of 100, so no test case ever exercises the actual checker logic.
Suggested fix
Replace the test inputs with Tid values where Tid % 100 falls in the range 1–20 (mapping to actual non-empty test generators). For example:
1.in: 1 (uses generator vf[1] — hand-crafted cases)
2.in: 102 (uses generator vf[2] — random short strings, seed=1)
3.in: 206 (uses generator vf[6] — long strings, seed=2)
This is 100% claude code generated, but I believe the problem is real (I had an empty program that pass the tests).
Problem 23 (A=B): All test inputs are multiples of 100, causing checker to skip all validation
Description
Problem 23's custom checker (
check.cpp) has an early-exit path at line 351:When
Tid % 100 == 0, the checker immediately returns_ok(accepted / full score) without generating any test strings or running the contestant's A=B program.All three test inputs in
testdata/trigger this path:1.in_ok2.in_ok3.in_okThis means any submission, including an empty program that produces no output, receives a perfect score of 100.
Reproduction
Submit the following trivial C++ program for problem 23:
It scores 100/100 on all three test cases.
Root cause
The checker's test generator maps
Tid % 100to a generator function viavf[data_id]. Generatorvf[0]is an intentionally empty lambda (produces zero test cases). Valid generators are at indices 1–16+. The early exitif (test_gen::Tid%100==0) quitf(_ok,"Test 0.")was likely intended as a sentinel for the empty-generator case, but all shipped test inputs happen to be multiples of 100, so no test case ever exercises the actual checker logic.Suggested fix
Replace the test inputs with
Tidvalues whereTid % 100falls in the range 1–20 (mapping to actual non-empty test generators). For example:1.in:1(uses generator vf[1] — hand-crafted cases)2.in:102(uses generator vf[2] — random short strings, seed=1)3.in:206(uses generator vf[6] — long strings, seed=2)