Skip to main content

Yet another helper for Olympiad in Informatics.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

oihelper-0.2.2.tar.gz (13.1 kB view details)

Uploaded Source

Built Distribution

oihelper-0.2.2-py3-none-any.whl (15.7 kB view details)

Uploaded Python 3

File details

Details for the file oihelper-0.2.2.tar.gz.

File metadata

  • Download URL: oihelper-0.2.2.tar.gz
  • Upload date:
  • Size: 13.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for oihelper-0.2.2.tar.gz
Algorithm Hash digest
SHA256 882814bd478765fa2acb68660180e9ed26d6f2d403322cfc76ff7ac67432a3aa
MD5 0524468f626d636f085c278cb98456b2
BLAKE2b-256 ef7723d9703d1bd834f655f6f27976f2f3dbcaa303f762264c20f95c48979184

See more details on using hashes here.

File details

Details for the file oihelper-0.2.2-py3-none-any.whl.

File metadata

  • Download URL: oihelper-0.2.2-py3-none-any.whl
  • Upload date:
  • Size: 15.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.0

File hashes

Hashes for oihelper-0.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 d3f2d5ab511a4178633dd9e9807980d7b52745bac4f127021d1e7c664f8b8e80
MD5 4e12a8e61f07aef42a3730acbf4d8795
BLAKE2b-256 7704ccb9c0520d9c1c748a681a9c47c5722cde2ae20b45d83719792416545c1f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page