GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - jayDevCodes/CodeJudge: A tiny local competitive programming judge written in C++. Run solutions against test cases instantly.

BranchesTags
Open more actions menu

Latest commit

 

History

13 Commits
13 Commits

Folders and files

NameName
Last commit message
Last commit date
screenshots
screenshots
 
 
tests
tests
 
 
README.md
README.md
 
 
color.h
color.h
 
 
cpjudge
cpjudge
 
 
cpjudge.cpp
cpjudge.cpp
 
 
cpjudgewin.exe
cpjudgewin.exe
 
 
solution
solution
 
 
solution.cpp
solution.cpp
 
 
solution.exe
solution.exe
 
 
temp.txt
temp.txt
 
 

Repository files navigation

CPJudge

A tiny local Competitive Programming Judge written in C++.

CPJudge allows you to run your solution locally against predefined test cases and instantly check whether your output matches the expected output.

This tool is useful for practicing competitive programming problems without needing an online judge.


Features

  • Run C++ solutions locally
  • Automatically test solutions with multiple input files
  • Compare program output with expected output
  • Simple PASS / FAIL test results
  • Lightweight and easy to use

Project Structure

cpjudge
│
├── cpjudge.cpp
├── solution.cpp
│
├── tests
│   ├── input1.txt
│   ├── output1.txt
│   ├── input2.txt
│   └── output2.txt
│
└── README.md

Program Example

CPJudge Screenshot 1



CPJudge Screenshot 2

Example Problem

Example solution (solution.cpp):

#include <iostream>
using namespace std;

int main() {
    int a, b;
    cin >> a >> b;
    cout << a + b << endl;
}

Example test files:

tests/input1.txt

1 2

tests/output1.txt

3

Compile

Compile the solution:

#Macos
g++ solution.cpp -o solution

#Windows
g++ solution.cpp -o solution.exe

Compile the judge:

#Macos
g++ cpjudge.cpp -o cpjudge

#Windows
g++ cpjudge.cpp -o cpjudge

Run the Judge

./cpjudge

Example output:

Test 1 PASSED
Test 2 PASSED

Passed 2/2 tests

Why CPJudge?

When practicing competitive programming, repeatedly copying input/output can be slow. CPJudge automates this process by running your program against predefined test cases instantly.


Future Improvements

  • Colored PASS / FAIL output
  • Support for unlimited test cases
  • Time limit enforcement
  • Command line arguments
  • Automatic compilation
  • Support for multiple programming languages

License

MIT License


Author

Jay Dev

GitHub: https://github.com/jayDevCodes

About

A tiny local competitive programming judge written in C++. Run solutions against test cases instantly.

Topics

competitive-programmingcpplocal-judgeonline-judgeprogramming-contests

Resources

Readme
Activity

Stars

10 stars

Watchers

0 watching

Forks

2 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.