All Projects → ia-toki → tcframe

ia-toki / tcframe

Licence: MIT license
Test cases generation framework for competitive programming problems

Programming Languages

C++
36643 projects - #6 most used programming language
CMake
9771 projects
shell
77523 projects

Projects that are alternatives of or similar to tcframe

tokilib
Framework for test case generators and validators
Stars: ✭ 16 (-89.12%)
Mutual labels:  competitive-programming, test-framework
Problem Solving Training
Problem solving training for computer science students.
Stars: ✭ 210 (+42.86%)
Mutual labels:  competitive-programming
Competitive programming
My solutions to programming contest problems from different sources (UVa, TopCoder, Live Archive, SPOJ, etc).
Stars: ✭ 153 (+4.08%)
Mutual labels:  competitive-programming
Library Checker Problems
The problem data (Test case generator, judge's solution, task, ...) of Library Checker
Stars: ✭ 183 (+24.49%)
Mutual labels:  competitive-programming
Halite Iii
Season 3 of @twosigma's artificial intelligence programming challenge
Stars: ✭ 159 (+8.16%)
Mutual labels:  competitive-programming
Tech Interview Preparation
A one stop solution to ace your next coding interview 👨‍💻
Stars: ✭ 188 (+27.89%)
Mutual labels:  competitive-programming
Mazassumnida
Github 프로필에서 boj 프로필을 이쁘게 보여주는 프로젝트
Stars: ✭ 147 (+0%)
Mutual labels:  competitive-programming
Interview Techdev Guide
This repository contains curated technical interview questions by fn+geeks community
Stars: ✭ 252 (+71.43%)
Mutual labels:  competitive-programming
Cph
Makes judging, compiling, and downloading problems for competitive programming easy.
Stars: ✭ 199 (+35.37%)
Mutual labels:  competitive-programming
Coding Ninjas Competitive Programming
Solutions to all the questions I solved during the Competitive programming course with Coding Ninjas.
Stars: ✭ 183 (+24.49%)
Mutual labels:  competitive-programming
Algorithms
A Repository to store implementation of some of the famous Data Structures and Algorithms (mainly in C/C++/Java/Python) for everyone to learn and contribute.
Stars: ✭ 178 (+21.09%)
Mutual labels:  competitive-programming
Competitive programming
Questions solved from Various Coding websites viz. HackerRank, HackerEarth, CodeChef and other websites. This repository also contains Questions from various offline and onsite competitions.
Stars: ✭ 159 (+8.16%)
Mutual labels:  competitive-programming
Competitive Programming Resources
This repository consists of data helpful for ACM ICPC programming contest, in general competitive programming.
Stars: ✭ 199 (+35.37%)
Mutual labels:  competitive-programming
Programming Contest
My solutions of some problems from different online judges
Stars: ✭ 158 (+7.48%)
Mutual labels:  competitive-programming
Atcoder Cli
AtCoder command line tools
Stars: ✭ 213 (+44.9%)
Mutual labels:  competitive-programming
Dreamjob
DreamJob
Stars: ✭ 152 (+3.4%)
Mutual labels:  competitive-programming
Luogu Problem List
A problem list for luogu OJ.
Stars: ✭ 176 (+19.73%)
Mutual labels:  competitive-programming
Dailycodebase
2 month data structures and algorithmic scripting challenge starting from 20th December 2018 - Coding is Fun! 💯💯 Do it everyday!! Also, Do give us a ⭐ if you liked the repository
Stars: ✭ 186 (+26.53%)
Mutual labels:  competitive-programming
How To Prepare For Google Interview Swe Sre
This repository includes resources which are more than sufficient to prepare for google interview if you are applying for a software engineer position or a site reliability engineer position
Stars: ✭ 251 (+70.75%)
Mutual labels:  competitive-programming
Hackerrank
Solution to HackerRank problems
Stars: ✭ 218 (+48.3%)
Mutual labels:  competitive-programming

tcframe 1.6.0

GitHub Release CI Status Coverage Status Documentation Status

tcframe is a C++ framework for generating test cases of competitive programming problems. This framework helps problem writers prepare test cases in a structured manner and ensures that the generated test cases are valid according to the specified constraints.

Consult the complete documentation at https://tcframe.toki.id.

Example high-level usage:

  1. Specify input/output variables.

    int A, B;
    int sum;
  2. Specify input/output formats, using a rich set of format macros.

    void InputFormat() {
        LINE(A, B); // A line containing space-separated A and B
    }
    void OutputFormat() {
        LINE(sum);
    }
  3. Specify the grading configuration.

    void GradingConfig() {
        TimeLimit(1);
        MemoryLimit(64);
    }
  4. Specify the constraints. Subtasks are supported.

    void Constraints() {
        CONS(1 <= A && A <= 1000);
        CONS(1 <= B && B <= 1000);
    }
  5. Specify the sample test cases.

    void SampleTestCase1() {
        Input({
            "2 8"
        });
        Output({
            "10"
        });
    }
    void SampleTestCase2() {
        Input({
            "42 100"
        });
        Output({
            "142"
        });
    }
  6. Specify the official test cases. Simple random number generator is available.

    void TestCases() {
        CASE(A = 1, B = 1);
        CASE(A = 77, B = 99);
        CASE(A = rnd.nextInt(1, 1000), B = rnd.nextInt(1, 1000));
    }
  7. Write and compile the official solution to this problem, using any programming language you wish. Of course, it is the infamous A+B problem.

    #include <iostream>
    using namespace std;
    
    int main() {
        int A, B;
        cin >> A >> B;
        cout << (A + B) << endl;
    }
  8. Run the generator. Actual test cases (.in and .out files) will be generated. Profit!

  9. If you ever specified an invalid test case, such as CASE(A = 0, B = 1), you will get a nice error message:

      sum_4: FAILED
        Description: A = 0, B = 1
        Reasons:
        * Does not satisfy constraints, on:
          - 1 <= A && A <= 1000
    

Features

tcframe supports:

  • Batch and interactive problems.
  • ICPC-style problems and IOI-style problems with subtasks and points.
  • Multiple test cases per file.
  • Local grading against the generated test cases, with time and memory limits.
  • Simple random number generation helper.

Requirements

tcframe requires:

  • Linux/macOS. Windows is not supported.
  • GCC which supports C++17.

Motivations

Why do we need test case generators?

  • Writing test cases manually is error-prone and time-consuming.
  • To enable distributing the test cases as a single, small generator file. No need to send 20 MB of testcases.zip over email anymore.
  • During problem development, constraints often change. Using a generator, we can easily amend the constraints and rerun the generator when needed.

Why do we need a framework for that?

  • Not everyone knows how to write a good test cases generator.
  • To avoid writing repetitive and boring tasks. For example: creating test case files with correct suffixes (foo_1.in, foo_1.out), running the official solution against the test case input files, etc.
  • To have a consistent format for generators, so that problem writers in a contest can better collaborate in writing test case generators.

Credits

tcframe is based on a paper submitted to IOI conference in 2015: Introducing tcframe: A Simple and Robust Test Cases Generation Framework, written by Ashar Fuadi.

tcframe was mainly inspired from testlib, written by Mike Mirzayanov et al.

License

tcframe is released under MIT license.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].