AI Agent Hub
Back to skills
OJ Test Data Generator icon

OJ Test Data Generator

Development Updated 2026.08.29

Paste the following prompt into your AI chat to install this skill:

Please follow https://skillhub.cn/install/skillhub.md to install @user_b89a4d0a/oj-data-generator.

About this skill

Problem

When creating test data for algorithmic OJ problems, hand-written random inputs often miss edge cases, formatting details, and problem-specific structures such as graph, DP, or string cases. This skill turns a problem statement into an executable test plan and validates outputs with a standard solution.

How It Works

  • Automatic analysis: extracts problem type, input/output format, constraints, and special boundary conditions; inferred ranges are marked clearly.
  • One-time confirmation: presents a full plan with test-point distribution, standard-solution approach, and delivery mode, then proceeds without step-by-step prompts.
  • cyaron generation: uses cyaron v0.7.0+ to create 1.in through 10.in, and generates .out files via std.py or std.cpp.
  • Test-point design: covers #1 minimal valid input, #2-3 boundary constructs, #4-6 medium random cases, #7-8 near-limit scale, and #9-10 extreme cases.
  • Validation: checks file count, non-empty files, UTF-8 encoding, standard-program exceptions or timeout, and supports reproducible output with --seed.

Caveats

The default delivery is a folder, not a ZIP; packaging requires explicit confirmation of flat or folder layout. It depends on the newer cyaron API and should not fall back to ordinary random. C++ standard solutions can fall back to Python if compilation fails, but the standard solution must pass first.

Use Cases

  • After writing a sorting standard solution, generate 1.in through 10.out with n=1, m=n, duplicates, and 10^5 scale.
  • Build Dijkstra test data with chain, flower, complete, and disconnected graphs while checking standard-solution timeout.
  • Infer default DP ranges when constraints are missing, confirm one plan, then generate seed-reproducible .in/.out data.
  • Create string cases covering empty, palindrome, max length, and deliver UTF-8 non-empty .in/.out folders.

Best For

  • Algorithm course or contest instructors who need quick, verifiable 10-set boundary test data per problem.
  • OJ problem maintainers who need to convert statements, limits, and graph/array structures into standard I/O sets.
  • Engineers writing standard solutions who need cyaron-generated data and AC-based validation to avoid bad releases.
  • Students preparing algorithm interviews who need sorting, shortest path, DP, and string edge cases to test solutions.