Skip to content

ShashidharM0118/Coding-Contest-App

Repository files navigation

Coding Contest App

A simple terminal-based coding contest platform with a graphical interface. Practice coding problems and get instant feedback through automated testing.

What You Need

Install YAD (the dialog tool) and a C/C++ compiler:

sudo apt install yad build-essential

How to Use

Start the app:

bash mainmenu.sh

Solve a problem:

  1. Click on a problem (A, B, or C)
  2. Read the problem statement
  3. Click "submit-code"
  4. Choose C or C++
  5. Paste your solution
  6. Hit OK and watch it test automatically

If all test cases pass, you'll see "Accepted" in your status!

Project Structure

├── mainmenu.sh          # Start here
├── probA.sh, probB.sh, probC.sh      # Problem interfaces
├── solA.sh, solB.sh, solC.sh         # Testing scripts
├── sol1/, sol2/, sol3/               # Test cases for each problem
│   ├── probX.txt        # Problem statement
│   ├── inputs/          # Test inputs (5 files)
│   └── answers/         # Expected outputs (5 files)
└── README.md

How It Works

Your code gets compiled and tested against 5 test cases automatically. If your output matches the expected answer for all cases, the problem is marked as solved.

Adding More Problems

  1. Create a sol4/ directory
  2. Add inputs/ and answers/ subdirectories
  3. Create 5 test cases (input1.txt-input5.txt and ans1.txt-ans5.txt)
  4. Copy probA.sh and solA.sh, rename to probD.sh and solD.sh
  5. Update paths in the new scripts
  6. Add a button in mainmenu.sh

Troubleshooting

App won't start? Make sure YAD is installed: sudo apt install yad

Compilation errors? Double-check your code syntax and make sure gcc/g++ is installed.

Tests failing? Your program should read from stdin and write to stdout. Check the expected outputs in the answers/ folder.


Built for practice and learning. Feel free to customize and add your own problems!

About

A coding contest practice platform with automated build-and-test workflow using Linux bash scripts

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published