Skip to main content

OI Helper

Yet another helper for Olympiad in Informatics!

Usage

Download using pip (make sure you have Python 3.10+ installed):

$ pip install oihelper

Problem parsing

OI-Helper will crawl for the specified problem and extract limitations and test samples. To do this, run:

$ oi-helper parse P1001  # https://www.luogu.com.cn/problem/P1001

This will also generate a blank template program called P1001.cpp in current folder if not exist.

Running your program

$ oi-helper run ./P1001.cpp

The above command will first look for sample cases parsed before in its database and run them. Then OI Helper will walk through the current directory and look for patterns such as P1001-1.in or P1001-1.out.

Example output below.

Running sample 0 ...
  AC / 0.02s / 604.0K
Running sample 1 ...
  AC / 0.01s / 476.0K
Discovered 2 local testcases in /Volumes/Data/Develop/Python/OI-Helper .
Running testcase 1 ...
  AC / 0.01s / 604.0K
Running testcase 2 ...
  AC / 0.01s / 604.0K

Submitting to OJ

Before submitting, you'll need to login first:

$ oi-helper login

This will ask for your credentials and a Captcha.

To submit program to a problem, run:

$ oi-helper submit ./P1001.cpp

This will automatically submit your program to online judge. Example output below.

Solution submitted with record ID 84279206.
Compiling...
Compiled successfully.
Subtask 1: AC / 0.03s / 808.0K
  #0: AC / 0.003s / 664.1K / ok accepted
  #8: AC / 0.003s / 668.0K / ok accepted
  #3: AC / 0.003s / 664.1K / ok accepted
  #6: AC / 0.003s / 668.0K / ok accepted
  #2: AC / 0.003s / 668.0K / ok accepted
  #5: AC / 0.003s / 789.1K / ok accepted
  #1: AC / 0.003s / 664.1K / ok accepted
  #4: AC / 0.003s / 668.0K / ok accepted
  #7: AC / 0.003s / 742.2K / ok accepted
  #9: AC / 0.003s / 668.0K / ok accepted
Status: Accepted / 100pts / 0.03s / 808.0K

Documentation

Use oi-helper [COMMAND] --help to see the manual.

Contributing

Contributions are highly welcomed!

Licensing

OI Helper is published under the MIT license. See LICENSE for details.

Metadata

Release files for oihelper 0.2.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for oihelper 0.2.3
File Size Uploaded
oihelper-0.2.3.tar.gz 13.2 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for oihelper 0.2.3
File Interpreter ABI Platform
oihelper-0.2.3-py3-none-any.whl Python 3 none any Details

Total release size: 28.9 kB

Release files / oihelper-0.2.3.tar.gz

Download URL oihelper-0.2.3.tar.gz
Size 13.2 kB
Tags Source
SHA-256 checksum
How to use checksums
f6e0d78d944f52014b14f82f8aeb2b864dda32f694c3285e49da5fc9bed6c044
BLAKE2b-256 checksum
How to use checksums
6b9d4444ce5c7965762a425997587086b21d1403c391afcdcf4b489d92090883
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release files / oihelper-0.2.3-py3-none-any.whl

Download URL oihelper-0.2.3-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
de4d3c3c69b9d67ddb42419892a0d8a623a740e3c2d6420508ee9809a985b71c
BLAKE2b-256 checksum
How to use checksums
6c5c93720c86735749462d1f2f00703fe8d9344c09bd06ef7dde8a1bbadb39d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.2.3 This release

2 release files

0.2.2

2 release files

0.2.1

2 release files

0.2.0

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page