Skip to main content

TCFrame

A test case generation framework for competitive programming problems.

Define input/output formats

void InputFormat() {
LINE(N);
LINES(A) % SIZE(N);
}

void OutputFormat() {
LINE(answer);
}

Define constraints

void Constraints() {
CONS(valueOf(N).isBetween(1, 1000);
CONS(eachElementOf(A).isBetween(1, 10));
}

Define test cases

void TestCases() {
CASE(N = 1, A = {10});
CASE(N = 100, randomArray());
}