sycu/task-solver-core

There is no license information available for the latest version (v0.1.8) of this package.

PHP Framework for competitive programming

v0.1.8 2022-12-23 01:41 UTC

This package is auto-updated.

Last update: 2024-04-23 04:27:28 UTC


README

PHP Framework for competitive programming

This is just a core for task solver. If you want to set up your own runtime environment, check sycu/task-solver repository.

Generating task

Generate src/Tasks/AwesomeTask.php class with namespace My\Tasks and data files in tasks/AwesomeTask:

$generator = new Solver\Generator\TaskGenerator('My\Tasks', 'src/Tasks', 'tasks');

$generator->generate('AwesomeTask');

Running tests

Run all tests for tasks located in src/Tasks matching Task[3-9] regexp. Namespace is My\Tasks and data files are stored in tasks/AwesomeTask:

$tasksLocator = new Solver\TasksLocator('My\Tasks', 'src/Tasks');
$testsRunner = new Solver\Runner\TestsRunner(new Solver\Runner\Progress\ConsoleProgress(new Solver\Output\ConsoleOutput()), $tasksLocator, 'tasks');

$testsRunner->run('Task[3-9]', false);