ACM SGU Competitive Programming Solutions with LLM Enhancement

Radoslav Dimitrov

2025

Overview

This repository contains solutions to ACM SGU (Saratov State University) competitive programming problems, enhanced with detailed editorials and reasoning explanations generated using advanced language models, and includes a finetuned model trained specifically on this dataset.

The repository consists of three main components:

Dataset Structure

dataset/
├── p100.txt          # Enhanced editorial with solution approach
├── p100_raw.txt      # Original source code solution + statement + sample input/output
├── p101.txt          # Enhanced editorial with solution approach  
├── p101_raw.txt      # Original source code solution + statement + sample input/output
└── ...               # Additional problems (100+ problems covered)

Enhanced Editorial Format

Each enhanced editorial (p*.txt) contains:

Model Finetuning

Dataset: 181 problems (and slowly increasing) from the SGU archive solved by me, enhanced with detailed editorials using GPT o4-mini.

Training Configuration:

Getting Started

# Install MLX for Apple Silicon
pip install mlx mlx-lm

# Install additional dependencies  
pip install matplotlib numpy transformers

Training Your Own Model

python3 src/finetune.py \
    --model path/to/base/model \
    --dataset_dir dataset \
    --epochs 3 \
    --batch_size 1 \
    --lr 1e-6 \
    --max_length 2048 \
    --output_dir path/to/output
@misc{dimitrov2025sgu,
  title={ACM SGU Competitive Programming Solutions with LLM Enhancement},
  author={Radoslav Dimitrov},
  year={2025},
}

Go back